Home Automation With Arduino and Bluetooth
by TECHATRONIC in Circuits > Arduino
13 Views, 0 Favorites, 0 Comments
Home Automation With Arduino and Bluetooth
Hello Guys, I'm back with another interesting and useful project based on Arduino and Bluetooth. Today we're going to demonstrate a home automation project using Arduino and Bluetooth. This project is the same as one of my previous projects of Wi-Fi home automation but in this one in place of NodeMCU and Wi-Fi we'll use Arduino & Bluetooth. For controlling all appliance, we'll use another application, which can either easily be built using MIT app inventor or can be downloaded via PlayStore.
There are many buttons in the app which send some variable when we press those buttons. Now, the Bluetooth HC-05 receives and sends this data to the Arduino by serial communication. And Arduino starts to compare this data with the Database, and there are many conditions for the different bulbs. If any condition finds true, then the associate bulb starts to glow. Here the HC-05 works as recipients and Arduino is like Controller. With the Arduino we are also using the relay module so that we can interface the electronic appliance with the Arduino. Bluetooth home automation.
For more information about how this project actually works and for more description about all modules used, visit original post and bookmark that website for pre-access to all my further articles.
Material Required
- Arduino Uno
- Bluetooth HC-05
- 4- channel Relay
- Jumper Wire
- Breadboard
- Arduino Cable
Circuit Diagram
Code
void setup() { Serial.begin(9600); // buart rate pinMode(12,OUTPUT); // RELAY MODULE pinMode(11,OUTPUT); // LED digitalWrite(12,HIGH); // relay module high } void loop() { if(Serial.available()>0) { char data= Serial.read(); Serial.println(data); if(data=='a') { digitalWrite(12,LOW); // RELAY ON digitalWrite(11,HIGH); // LED ON Serial.println("RELAY AND LED ON"); } if(data=='b') { digitalWrite(12,HIGH); // RELAY OFF digitalWrite(11,LOW); // LED OFF Serial.println("RELAY AND LED OFF"); } } }
For explanation related code, and it's working, visit its original post.