Remote control.

Connecting the bluetooth module HK-05 to arduino

Class: Technology, Arduino


  • arduino
  • bluetooth module HK-05
  • Smartphone
    • arduino
One of the most popular and common methods of data exchange via Bluetooth. Characteristics
  • Supply voltage 3,3-6 V
  • The maximum input voltage of the logical unit is 5 V
  • The output voltage of the logical unit is 3.3 V
  • Maximum current consumption 45 mA
  • Data transfer rate 1200-1382400 baud
  • Communication range with line of sight 30 m
Connection Connect the bluetooth module to the Arduino board directly or via the breadboard. The connection is standard for devices that connect via the serial interface.
  • Contact RX module is connected to the TX pin of the target device
  • Connect TX module is connected to the RX pin of the target device
  • Default settings
  • Baud rate 9600 baud
  • Name of module HC-06
  • Password for connecting 1234
  • All the default settings can be changed using AT commands.
The Bluetooth module HC-05 can perform in glory and mayster mode. This means that it can independently connect to other Bluetooth-enabled devices. I will connect the bluetooth module with phone (ANDROID), so need to perform 2 actions: to pair the module and the device, to manage through any terminal. You can use any terminal to transfer data. I used a simple and free “Bluetooth Terminal” . As an example, I will change the state of the built-in LED “LED 13” on the Arduino board. It will be switched on when the letter “W” is received, but it is switched off at “S”. The sketch below should be poured into the Arduino board. When pouring into the board, it is necessary to disconnect the power from the bluetooth module, after connecting it again.
int val;
int LED = 13;
void setup()
pinMode(LED, OUTPUT);
void loop()
if (Serial.available())
val =;
// При символе “W” включаем светодиод
if (val == ‘W’)
digitalWrite(LED, HIGH);
// При символе “S” выключаем светодиод
if ( val == ‘S’)
digitalWrite(LED, LOW);

    First action.Connect to phone
    Second action
    Load bluetooth terminal and connect to HC-05
The rest of the project you can see in the posts of Kamila

Trackback from your site.

address: 20 Myasnitskaya ulitsa
(metro stations ‘Lubyanka’ and ‘Kitay-Gorod’)
Moscow 101000 Russia

phone: +7(495)772-95-90 *15026