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.
This Post / Project can also be found using search terms:
- arduino hc-05 tutorial
- arduino bluetooth hc 05 tutorial
- arduino hc 05 tutorial
- arduino mega bluetooth hc-05 tutorial