Uniostar
Published © GPL3+

HC-05 Bluetooth Module with Arduino via AT Command Mode

Confused about how to change default setting on the HC-05 Bluetooth module? Learn more.

BeginnerProtip30 minutes41
HC-05 Bluetooth Module with Arduino via AT Command Mode

Things used in this project

Hardware components

HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Arduino Nano R3
Arduino Nano R3
×1
Solderless Breadboard Half Size
Solderless Breadboard Half Size
×1
Male/Male Jumper Wires
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

Full List of AT Commands

Schematics

Schematic

Code

Code to Set Up AT Command Mode

Arduino
#include <SoftwareSerial.h>

SoftwareSerial Bluetooth(10 , 11); //RX, TX
char c = ' ';

void setup() 
{
  Serial.begin(9600);
  Serial.println("Enter AT Commands!");
  Bluetooth.begin(38400);
}

void loop() 
{
  if(Bluetooth.available() > 0)
  {
    c = Bluetooth.read();
    Serial.write(c);
  }
  if(Serial.available() > 0)
  {
    c = Serial.read();
    Bluetooth.write(c);
  }
}

Credits

Uniostar
10 projects • 8 followers
Electrical Engineering Undergrad Student specialized in low-level programming, IoT projects, and microcontroller electronics.

Comments