
In this article we are showing voice control home automation system to control appliances with own voice command an Android app IoTBoys. An Arduino Uno board is used for controlling the relay through which an appliance is getting switch on/off.
Components you needed :-
- 1 x Arduino uno
- 1 x Relay board
- 2 X AC Bulb (red, yellow)
- 1 x Bluetooth module (HC-05)
- 1 x USB cable
- 1 x breadboard
- 8 x jumper wire (male to female)
- 2 x jumper wire (male to female)
- 1 x Android app IoTBoys available on google play store
Connection :-
Sketch/Source Code :-
String voice; int RED = 2; int YELLOW = 3; void RedOn(){ digitalWrite (RED, LOW); } void RedOff(){ digitalWrite (RED, HIGH); } void YellowOn(){ digitalWrite (YELLOW, LOW); } void YellowOff(){ digitalWrite (YELLOW, HIGH); } void allon() { digitalWrite (RED, LOW); digitalWrite (YELLOW, LOW); } void alloff() { digitalWrite (RED, HIGH); digitalWrite (YELLOW, HIGH); } void setup() { Serial.begin(9600); pinMode(RED, OUTPUT); pinMode(YELLOW, OUTPUT); digitalWrite (RED, HIGH); digitalWrite (YELLOW, HIGH); } void loop() { while(Serial.available()) { delay(10); char c=Serial.read(); if(c=='#') { break; } voice += c; } if (voice.length() > 0) { Serial.println(voice); if (voice == "on" || voice== "all on") { allon() ; } else if (voice == "off" || voice=="all off") { alloff() ; } else if(voice =="red" || voice =="red on"){ RedOn(); } else if(voice =="red off"){ RedOff(); } else if(voice =="yellow" || voice =="yellow on"){ YellowOn(); } else if(voice =="yellow off"){ YellowOff(); } voice=""; } }
- 0 Comments
- AC bulb using voice command
- arduino bluetooth hc-05
- HC-05 arduino
- hc05 arduino tutorial
- Home automation in arduino
- Home automation system using IoT
- Home automation using arduino
- Home automation using IoT
- How IoT is being used in home automation
- how to use bluetooth in arduino
- IoT Boys
- IoTBoys
- Voice Control Home Automation System Using Arduino and HC-05
- Voice Controlled Home Automation System Arduino