Control it All with HC-05/HC-06 Bluetooth Module

In this article, we’ll look at how to control an LED over Bluetooth using the HC-06 Bluetooth module, Bluetooth Serial mobile app and your Arduino.

You’ll need the following items to carry out this project


  • HC-06 Bluetooth module, get it here
  • USB to UART cable, get it here
  • Arduino UNO, downlaod here


  • Any terminal of your choice, i’ll be using Tera Term for this project, get it here
  • Latest Arduino IDE, get it here
  • Go to your mobile app store and download Bluetooth Serial App.

Introducing the HC-06 Bluetooth Module

The HC-06 module is a device based on the BC417 2.4GHz Bluetooth radio chip. It uses an 8MB flash memory. These small 3 cm long modules run off 3.3V power and logic level. The HC-06 module includes the Radio and Memory chips, 26 MHz crystal, antenna and RF matching network. The right section of the BT Board has connection pins for power and signals as well as a 5V to 3.3V Regulator, LED, and level shifting. Baud Rate: 9600 bps, Data : 8 bits, Stop Bits: 1 bit, Parity : None, Handshake: None

Please note that HC-05 is the sister module of the HC-06 which can act alternately as a master or slave device. HC-06 functions only as a slave.

HC-06 Bluetooth module
HC-06 Bluetooth module



FTDI to HC-06 circuit
USB-UART Converter to HC-06 circuit


If you haven’t downloaded the Tera Term software and Bluetooth Serial mobile app, please refer to the beginning of this article.

Start your Tera Term software

  • Click on the Serial radio button
  • Click the port drop down select the appropriate COM port
Tera Term software
Tera Term software
  • Type in AT, you should get an “OK” response, that means your module is functioning correctly.
  • Type in AT+VERSION? to get the version of your module
  • Type in AT+PSWD? to get the password of your module
  • To change the name of your HC-06 module, disconnect power from the module, hold down the button on the module and re-connect the power, then type in AT+NAME CHOICEOFNAME, replace CHOICEOFNAME with the name you want.

Start your Bluetooth Serial mobile app,

  • Click the connect button on the top right
  • Select the HC-06 module to connect to it
Bluetooth Serial mobile app
  • If your textbox isn’t showing below the screen, click the Preference button on the top right
  • Scroll down and toggle the Text Box and Sent Data mode
Bluetooth Serial mobile app
Bluetooth Serial mobile app
  • Click on the text box, type any letter or word of your choice
  • You’ll see them appear on the Tera Term software screen.

Now, we can communicate with the HC-06 module, let’s control an LED with an Arduino using the Bluetooth Serial mobile app.



HC-06 Arduino LED circuit
HC-06 Arduino LED circuit


  • Start your Arduino IDE and copy the following code
char data = 0; //Variable for storing received data
void setup()
 Serial.begin(9600); //Sets the baud for serial data transmission 
 pinMode(13, OUTPUT); //Sets digital pin 13 as output pin
void loop()
 if(Serial.available() > 0) // Send data only when you receive data:
   data =; //Read the incoming data & store into data
   Serial.print(data); //Print Value inside data in Serial monitor
 if(data == '1') // Checks whether value of data is equal to 1
   digitalWrite(13, HIGH); //If value is 1 then LED turns ON
 else if(data == '0') // Checks whether value of data is equal to 0
   digitalWrite(13, LOW); //If value is 0 then LED turns OFF


  • Start the Serial Monitor and set the BAUD rate to 9600.
  • In your Bluetooth Serial mobile app, type in 1/0 to turn on/off the LED
Arduino serial monitor result
Arduino serial monitor result

Wanna do more?

You can control things robots and and carry out home automation projects with your smart phone. Get a relay,  here and start to switch real loads.




Leave a Reply

Your email address will not be published. Required fields are marked *