LED Operating via Bluetooth Module, In this project is about making the LEDs on and via taking inputs from the Mobile Phone using Bluetooth. Here I have used a Bluetooth module HC-05 and interfaced with the Arduino UNO. I have used 4 LEDs each will take different commands for ON & OFF operation via mobile phone.
First Place the 4 LEDs in a bread Board I have used a mini bread broad here and connect them using the wires I have made the common ground for all of them and after that, I will connect the ground to the ground available in the Arduino UNO.
Now make sure to connect the +ve of the less in this order 1st to pin 13, 2nd to pin 12, 3rd to pin 11, and 4th to pin 10 of the Arduino. You can change them if you want but you also have to make changes in the code as well.
Now coming to the HC-05 Connect the ground and VCC to the ground and 5V respectively and Connect the RX pin to the TX and TX pin to the RX of the Arduino after uploading the code. This step is very important otherwise your code won't upload and it will give you an error.
Now everything is ready just make the connections I am not providing any schematic because it is easier and simple.
Now after the final connection it will look like this:
Now we come to the programming part, Here in the code I have defined the constants for the LED pins like L1, L2, L3 and L4 using constant is a good habit and if you want any amendment you can make it easier. In the void setup () define all the pinModes() and start the serial command with the baud rate of 9600. Now the void loop is simple I have used the switch cases like when the input is A on LED1 for B off LED1 like that I will provide the code below in the attachment for your reference.
For taking signal via Mobile Phone you can use the Bluetooth Terminal HC-05 app available in the play store download it and connect to the HC-05.
https://play.google.com/store/apps/details?id=project.bluetoothterminal&hl=en_IN&gl=US
Now Our final project will look like this:
Comments
Please log in or sign up to comment.