Arduino Bluetooth Tutorial HC-05

Bluetooth has been around for quite a while now. Being a common way to communicate with mobile phones, it was only natural to include this protocol in the Arduino arena.
 
Bluetooth is typically a low power, medium range device, in fact it can reach up to 10 meters. Bluetooth operates on the same frequencies as WiFi, 2.4Ghz.Connections are normally one to one meaning no group communication is allowed by the protocol. The connection is established by a master device, which connects to a slave device. In internet terminology the master is the client and the slave is the server. Certain devices can be configured to act as both master and slave (like the HC-05) while others are pre-programmed as slaves only (like the HC-06).
After a successful connection has been established the two devices can exchange data. Data is exchanged as bytes but there are libraries which make it easy to send strings and other data types in a transparent manner.

Can Arduino control a Bluetooth device? Of course, the most common devices are the HC-05 and HC-06. The difference between the two is that the HC-05 can act as a slave and as a master, while the HC-06 can act just as a slave. So don’t bother with the HC-06 ?  In this tutorial we will set up a slave HC-05 Bluetooth device and pair it with an Android phone. Then using a Bluetooth terminal found on the Android Play Store, we will be able to send commands to the Arduino and receive confirmation. We will try to switch the builtin LED on pin 13, on and off.

Hardware needed


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top