This project aims to control various electronic components using wireless technology (in this case blue-tooth).
Interfacing of LED and HC-05 with Arduino Uno
This project aims to control the blinking of a LED using wireless technology. This will serve as a base to build more amazing projects on home automation and many more automation projects that are coming very soon.
Headline:
Step 1: Connect and a LED to any Arduino board with the help of jumper wires.
Step 2: Connect the blue-tooth module (HC-05) to the Arduino with the help of jumper wires. Except the first and the last pin, all other pins need to be connected to the Arduino.
Ground of HC-05 to Ground of Arduino.
Power of HC-05 to 3.3V of Arduino.
Tx of HC-05 to Rx of Arduino.
Rx of HC-05 to Tx of Arduino.
int led=8;
void setup() {
pinMode(8,OUTPUT);
Serial.begin(9600);
}
void loop() {
if (Serial.available()>0) {
char data=Serial.read();
switch(data)
{
case 'a':digitalWrite(8,HIGH);
break;
case 'b':digitalWrite(8,LOW);
break;
default: break;
}
delay(100);
}
}