Using an HC05 bluetooth module i connected my arduino board to my phone through an android app called "Arduino Bluetooth Control".
Components Used:-HC05 Bluetooth module,Arduino Board,Led light and Jumper wires
Working:-Using a serial Communication at a baud rate of 9600 we connect our HC05 to the Board using the app and send a value of 1 in order to light the led.Connect the longer pin of the led to the pin 2 of arduino and the other end to pin 3.The HC05 can be connected according to the following diagram.
![](https://static.wixstatic.com/media/a27d24_a99fd09a0890400db4d8f868072cadf5~mv2.jpg/v1/fill/w_980,h_450,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/a27d24_a99fd09a0890400db4d8f868072cadf5~mv2.jpg)
Code:-
void setup()
{
Serial.begin(9600);
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
}
void loop()
{
while(Serial.available()!=null)
{
if(Serial.read()=='1')
{digitalWrite(2,HIGH);digitalWrite(3,LOW);}
else if(Serial.read()=='2')
{digitalWrite(2,LOW);digitalWrite(3,LOW);}
}
}