Arduino Home automation icon

Arduino Home automation

1.1.2

Để điều khiển các thiết bị gia dụng thông qua điện thoại Android của bạn

App Information

Phiên bản
Cập nhật
26 th 07, 2020
Nhà phát triển
Thể loại
Lượt cài đặt
10.000+

App Names

App Description
Using this app with micro controllers (Arduino, Raspberry Pi, AVR, ARM etc), HC-05 Bluetooth Module and Relay Module you can control your home appliances using your smartphone remotely.

Read documentaion : http://unciarobotics.com/project/home-automation-project-with-arduino-using-hc-05/

The basic Arduino code to read data transmitted over Bluetooth is as follows:

const int relay = 2; //pin where Relay is connected
char data; //variable to store data
void setup() {
Serial.begin(9600); //Begin serial communication
pinMode(relay, OUTPUT); //make relay pin as output
}

void loop() {
if (Serial.available() > 0) //if there is data on RX
{
data = Serial.read(); //save it inside variable
if (data == 'a')
{ digitalWrite(relay, HIGH); //Turn ON the Light
Serial.println("Light ON");
}
if (data == 'b')
{ digitalWrite(relay, LOW); //Turn OFF the Light
Serial.println("Light OFF");
}
}
}
}
}

//Copy Paste this code into Arduino IDE and monitor the data on Serial Monitor.
Đọc thêm