Smart Home Project Using Android Mobile and Arduino Uno
This Video demonstrate the Smart Home Project. This Video guide you step by Step How to Control Home Appliances from Android Mobile using Arduino Uno, Relays and Bluetooth Module. How to Use Bluetooth Module? How to write a Small program for the Smart Home Project? How to Control Home Appliances Using Android Mobile through Bluetooth? How to compile and upload the Sketch or Program to the Arduino Uno.
My YouTube Channel:
Arduino Program for Smart Home
byte v1;
void setup()
{
Serial.begin(9600);
pinMode(7, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6,OUTPUT);
pinMode(3,OUTPUT);//Light1 pin
}
void loop()
{
int a = 0;
if (Serial.available())
{
v1 = Serial.read();
Serial.println(int(v1));//Display received value on Serial Monitor
if (int(v1) == 49) //Turn Light1 ON
digitalWrite(7, HIGH);
else if (int(v1) == 50) //Turn Light1 OFF
digitalWrite(7, LOW);
if (int(v1) == 51) //Turn Light2 ON
digitalWrite(3, HIGH);
else if (int(v1) == 52) //Turn Light2 OFF
digitalWrite(3, LOW);
if (int(v1) == 53) //Turn Light3 ON
digitalWrite(5, HIGH);
else if (int(v1) == 54) //Turn Light3 OFF
digitalWrite(5, LOW);
if (int(v1) == 55) //Turn Light4 ON
digitalWrite(5, HIGH);
else if (int(v1) == 56) //Turn Light4 OFF
digitalWrite(5, LOW);
if (int(v1) == 57) //Lock Light5 ON
digitalWrite(6, HIGH);
else if (int(v1) == 48) //Unlock Light Off
digitalWrite(6, LOW);
}
}
Watch the complete implementation of the above program with circuit in the below YouTube Video :
Please don't forget to Subscribe and Like the Video