Bluetooth based Home automation

SRJT10304

Jugaadu decides to develop an advanced Automation system for his home. As he is always in a hurry, in the morning while he leaves for his office. Therefore, he wants to operate almost all the devices in his home( like turning ON and OFF- lights, water pump and others with an automation system). How can you help him? ants even remotely?

  1. Arduino UNO UNO
  2. Jumper Wires
  3. USB Cable
  4. Foamsheet
  5. Motor Driver
  6. Gluegun
  7. Water Pump
  8. Cutter
  9. Battery
  10. Pipe
  11. Bluetooth module HC05
  12. Breadboard
  13. Buzzer
  14. LED
To make a Bluetooth-controlled home automation system use Bluetooth module HC-05 and Arduino UNO. By this way, we can operate multiple devices at the same time hence saving a lot of time as well.

    String inputString; 

void setup() { 
Serial.begin(9600); 
pinMode(13, OUTPUT); 
} 

void loop() { 
while(Serial.available()){ 
delay(50); 
char c=Serial.read(); 
inputString+=c; 
} 
if(inputString.length()>0){ 
Serial.println(inputString); 
if (inputString =="LEDON"){ 
digitalWrite(13, HIGH); 
} 
else if (inputString =="LEDOFF"){ 
digitalWrite(13, LOW); 
} 
else if (inputString =="BUZZON"){ 
digitalWrite(8, HIGH); 
} 
else if (inputString =="BUZZOFF"){ 
digitalWrite(8,LOW); 
} 
else if (inputString =="PUMPON"){ 
digitalWrite(6, HIGH); 
digitalWrite(7, LOW); 
} 
else if (inputString =="PUMPOFF"){ 
digitalWrite(6,LOW); 
digitalWrite(7,LOW); 
} 

inputString=""; 
} 
delay(100); 
}