How to Control a Bluetooth (HC-05) With Arduino
by Trying Together in Circuits > Arduino
507 Views, 5 Favorites, 0 Comments
How to Control a Bluetooth (HC-05) With Arduino
Hello my friends in this lesson we will learn how to control a dc motor with our smartphone or tablet.To achieve this we will use a L298N motor controller and Bluetooth module(HC-05).
So let’s start
Materials/Things You Need
Hardware
1. Bluetooth Module HC-05
2. Arduino
3. DC Motor(6V)
4. L298n Motor Controller
5. Jumper wires male to male
6. Jumper wires male to female
7. Power Supply Adapter 9V
8. Smartphone or tablet
Software
Arduino IDE
Links:
1. https://www.ebay.com/sch/i.html?_from=R40&_trksid=...
2. https://www.ebay.com/sch/i.html?_from=R40&_trksid=...
3. https://www.ebay.com/sch/i.html?_from=R40&_trksid=...
4. https://www.ebay.com/sch/i.html?_from=R40&_trksid=...
5. https://www.ebay.com/sch/i.html_from=R40&_trksid=p...
Wiring Diagram/Connections
Code
The code is designed very carefully in order to understand by everyone. In the image I explain what I have written. If you face any problem please write your comment below and I will answer you as soon as possible.
NOTE
HC-05 uses the serial communication. So begin the serial communication by using the function "Serial.begin()". Set the baud rate as 9600. Before uploading the sketch to your arduino board, make sure to remove from pins 0 and 1 of arduino the jumper wires or else it won’t upload it to the board. This happens because PC and Arduino use the same communication when upload a sketch. After uploading the sketch, connect the jumper wires to your board.
Android App
For this project I use this app. You can download it from here
https://play.google.com/store/apps/details?id=brau...
You have to pair the HC-05 bluetooth module with your smartphone or tablet and then your device (tablet or mobile) with app in order to work. Don’t worry it is very easy.
That's It
The project is finished. I hope you like it. If you face any problems please write your comment below and I will answer you as soon as possible.