fbpx

In this project, I have made Bluetooth(HC-05) control Home automation prototype.

I have used Bluetooth irrespective of any Wifi module because,

Bluetooth device can be implemented even in remote area, where 24*7 wifi probably possible

Home Automation

int pin=13;

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

pinMode(pin,OUTPUT);

}

void loop()

{

while(!Serial.available());

byte value = Serial.read();

switch(value)

{

case ‘F’:

digitalWrite(pin,LOW);

Serial.println(“light Off”);

delay(100);

break;

case ‘O’:

digitalWrite(pin,HIGH);

Serial.println(“light on”);

delay(100);

break;

}

}

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

or

Log in with your credentials

or    

Forgot your details?

or

Create Account