Program for bluetooth Home automation using Arduino UNO and HC-05 bluetooth module
C++
// programmed by KAVIKUMARAN G
// Electrical and Electronics Engineering
//Visit : Pickupmyskills.com
char incoming_value = 0;
void setup()
{
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
}
void loop() {
switch (incoming_value) {
case '1':
digitalWrite(13, HIGH);
break;
case '2':
digitalWrite(13, LOW);
break;
case '3':
digitalWrite(12, HIGH);
break;
case '4':
digitalWrite(12, LOW);
break;
default:
Serial.print("invalid");
break;
}
}