Anda di halaman 1dari 8

Bluetooth HC-05

Internet of Things Workshop (C) Ravi Subramanian


Bluetooth Module
Bluetooth is widely used for short distance RF communication
There are a wide variety of Bluetoth modules
HC-05
HC-06
HM-10
HM-11
The HC-05 Bluetooth module are by far the most popular and
inexpensive Bluetooth module used for RF communications

Internet of Things Workshop (C) Ravi Subramanian


Bluetooth HC-05
Bluetooth HC-05 to Arduino Connection
Arduino HC-05
GND GND
+5V VCC
Tx Rx
Rx Tx

STATE (output) and EN (input) of HC-05 are not connected


The HC-05 comes with a set of AT commands to change the module's
default settings like
pass code
device name
baud rate

Internet of Things Workshop (C) Ravi Subramanian


Bluetooth HC-05- Practice
Bluetooth parameter can be modified in AT Mode
Steps to put Bluetooth in AT Mode
Disconnect the power to the HC-05 module.
Load the sketch to the Arduino
Depress the small reset button on the HC-05 module and hold it down while you connect its Vcc
pin to +5V
The red LED on the module will flash slowly indicating it is in AT mode
Open a serial monitor in the Arduino IDE and set its baud rate to 57600
and ensure that the transmit function sends both New Linefeed (\n) and
Carriage Return (\r) after every AT command entered
On the IDE serial terminal, ensure Both NL & CR is selected
You should then see the prompt Enter AT commands:
You can then type your AT commands into the terminal input line and
have them control the HC-05

Internet of Things Workshop (C) Ravi Subramanian


Bluetooth HC-05- Practice
Repeat exercise for an IOT device that uses an LM35 temperature
sensor and HC-05 for temperature data to Andriod Phone/PC

Internet of Things Workshop (C) Ravi Subramanian


Session Quiz
Using AT Command one can change following parameter of HC-05
Baud Rate
Passcode
Device Name

Options
1. A
2. B
3. A and B
4. A, B & C

Internet of Things Workshop (C) Ravi Subramanian


Session Quiz
Answer
4:

Internet of Things Workshop (C) Ravi Subramanian


End of Bluetooth Module

Internet of Things Workshop (C) Ravi Subramanian 8

Anda mungkin juga menyukai