LED ON/OFF With Arduino Using Bluetooth
LED ON/OFF With Arduino Using Bluetooth
Hardware Required
- Breadboard
- Arduino Board
- Male-Male Jumper Wires
- HC-05 Bluetooth Module
- LED Red
- LED Yellow
Connections
- Here, the HC-05 Bluetooth module is connected to the bread board.
- The VCC pin of the Bluetooth module is connected to the 5V pin of the Arduino board along the power rail.
- Further, the GND pin of the Bluetooth module is connected to the GND pin of the Arduino board.
- Then, the RX pin of the Bluetooth module is connected to the TX pin of the Arduino board and the TX pin of the Bluetooth module is connected to the RX pin of the Arduino board.
- There are 2 LEDs which are connected to the breadboard, red and yellow.
- The negative terminal of the red LED is connected to the GND pin of the Arduino board on the right hand side and the positive terminal of the red LED is connected to the 13th digital pin of the Arduino board.
- Further, the positive terminal of the yellow LED is connected to the 12th digital pin on the Arduino board and its negative terminal is connected to the jumper wire which is connected to the 13th digital pin of the Arduino board.
- The circuit is ready.
Programming The Arduino Board
- In the below code, we have given the addresses with respect to the identity of the digital pins, what is connected to the digital pins in the Arduino board , GND and VCC pins.
- Also, specific notations are given to the turning on and turning off processes of the LEDs.
- Foe red LED, ON=A and OFF=B.
- Similarly, for yellow LED, ON=C and OFF=D.
- To make this work, you can write the code given below.
- To make the code work and to connect the Bluetooth module, we used an app called "Arduino Bluetooth Controller".
- After downloading the app, you will get the interface as follows:
- The circuit works as demonstrated in the video attached below.
Comments
Post a Comment