Home Automation Using Arduino and Bluetooth Module - In this tutorial I will show you home automation using Arduino, Relay and Bluetooth module to control the appliances with an android mobile.
Components : Buy Links
1. Arduino Uno - https://amzn.to/3b3gUZ7
2. Relay Module - https://amzn.to/3rzm7yM
3. Bluetooth Module - https://amzn.to/3vgCliT
4. Jumper Wires - https://amzn.to/2LT2tym
Arduino Code/*Subscribe to KMTECH For More arduino related videosRelay IN1 connected to PinOut 4 ArduinoRelay IN2 connected to PinOut 5 ArduinoRelay IN3 connected to PinOut 6 ArduinoRelay IN4 connected to PinOut 7 Arduino--->you can connected to relay modul 4 channelSerial data sending from Arduino Bluetooth Relay 4CH.apkdata '1'-'4' to on is Ralay CH 1-4data 'A'-'D' to off is Ralay CH 1-4data '9' to on ALL CH 1-4data 'I' to off ALL CH 1-4*/int relay1=4;int relay2=5;int relay3=6;int relay4=7;char val;void setup() {pinMode(relay1,OUTPUT);pinMode(relay2,OUTPUT);pinMode(relay3,OUTPUT);pinMode(relay4,OUTPUT);digitalWrite(relay1,HIGH);digitalWrite(relay2,HIGH);digitalWrite(relay3,HIGH);digitalWrite(relay4,HIGH);Serial.begin(9600);}void loop() {//check data serial from bluetooth android Appwhile (Serial.available() > 0){val = Serial.read();Serial.println(val);}//Relay is onif( val == '1' ) {digitalWrite(relay1,HIGH); }else if( val == '2' ) {digitalWrite(relay2,HIGH); }else if( val == '3' ) {digitalWrite(relay3,HIGH); }else if( val == '4' ) {digitalWrite(relay4,HIGH); }//relay all onelse if( val == '9' ) {digitalWrite(relay1,HIGH);digitalWrite(relay2,HIGH);digitalWrite(relay3,HIGH);digitalWrite(relay4,HIGH);}//relay is offelse if( val == 'A' ) {digitalWrite(relay1,LOW); }else if( val == 'B' ) {digitalWrite(relay2,LOW); }else if( val == 'C' ) {digitalWrite(relay3,LOW); }else if( val == 'D' ) {digitalWrite(relay4,LOW); }//relay all offelse if( val == 'I' ) {digitalWrite(relay1,LOW);digitalWrite(relay2,LOW);digitalWrite(relay3,LOW);digitalWrite(relay4,LOW);}}
Circuit DiagramClick Here to See the Full Tutorial and Codes
MORE VIDEOS
Comments
Please log in or sign up to comment.