
What are you thinking about Controlling LED from your own voice command ?? When I heard about it I thought it would be very difficult project to controlling LED from Voice. If you are also feeling the same trust me it’s as easy as making cup of tea. So without wasting time let’s see How to Control LED from your Voice Command using Arduino and HC-05 Bluetooth module.
So to catch our voice command and process to Arduino board we need something right? To achieve this we have developed an Android App that is IoTBoys freely available on Google Play Store. So what does this IoTBoys App do ? Ok. The purpose of this application is to detect the voice command and pass through Serial Communication HC-05 to the Arduino Board. As we have written sketch below that will take care of all. Once you watch below video you will understand clearly.
Components you needed for Control LED From Your Voice Command Using Arduino and HC-05 Bluetooth:-
- Arduino Uno Board
- 1 x USB cable
- 1 x Bread Board
- 1 x Bluetooth (Module HC-05)
- 3 x LED (Red, Green, Blue)
- 4 x Jumper wire (Male to Male)
- 4 x Jumper wire (Male to Female)
- Android app IoTBoys Available in play store
Wiring Connection for Control LED From Your Voice Command Using Arduino and HC-05 Bluetooth:-
Note – You need to first unplug RX and TX connection from Arduino and then upload the below sketch else you may face uploading error.
Sketch/Source Code :-
String voice; int RED = 2; int GREEN = 3; int BLUE = 4; void RedOn(){ digitalWrite (RED, HIGH); } void RedOff(){ digitalWrite (RED, LOW); } void GreenOn(){ digitalWrite (GREEN, HIGH); } void GreenOff(){ digitalWrite (GREEN, LOW); } void BlueOn(){ digitalWrite (BLUE, HIGH); } void BlueOff(){ digitalWrite (BLUE, LOW); } void allon() { digitalWrite (RED, HIGH); digitalWrite (GREEN, HIGH); digitalWrite (BLUE, HIGH); } void alloff() { digitalWrite (RED, LOW); digitalWrite (GREEN, LOW); digitalWrite (BLUE, LOW); } void setup() { Serial.begin(9600); pinMode(RED, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BLUE, OUTPUT); } 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") { 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 =="green" || voice =="green on"){ GreenOn(); } else if( voice =="green off" ){ GreenOff(); } else if(voice =="blue" || voice =="blue on"){ BlueOn(); } else if(voice =="blue off"){ BlueOff(); } voice=""; } }
Control LED From Your Voice Command Using Arduino and HC-05 Bluetooth
Home Automation Using Facebook Chat And Arduino ESP8266 WiFi Module
Voice Control Home Automation System Using Arduino and HC-05
How To Control Home Appliance From Internet Using Arduino and ESP8266
- 19 Comments
- android control home appliances
- Arduino bluetooth
- Arduino bluetooth tutorial
- Arduino easy projects
- arduino projects
- automation projects
- Control LED From Your Voice Command Using Arduino and HC-05 Bluetooth
- Control LED Using Your Voice Command
- hc-05 bluetooth
- hc05 tutorial
- how to use bluetooth
- how to use bluetooth in arduino
- IoT Boys
- IoTBoys
- LED control using voice command
loveth
hello i am having issuses uploading to my elegoo UNO R3 board.
this is the error message
Arduino: 1.8.3 (Windows 10), Board: “Arduino/Genuino Uno”
Sketch uses 3836 bytes (11%) of program storage space. Maximum is 32256 bytes.
Global variables use 282 bytes (13%) of dynamic memory, leaving 1766 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can’t open device “\\.\COM1”: The system cannot find the file specified.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
IoT Boys
Hello Loveth,
Thanks for contacting us.
Please follow the given link, hope it works for you.
https://stackoverflow.com/questions/25718779/arduino-nano-avrdude-ser-opensystem-cant-open-device-com1the-system
Best Regards,
IoTBoys
https://facebook.com/iotboys
https://twitter.com/iotboys
memoll
hi
when i click on upload after some minutes this massage appear: what do u suggest?
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x54
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x54
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
IoT Boys
Hello Memoll,
Thanks for reaching us.
Please check this link https://stackoverflow.com/questions/19765037/arduino-sketch-upload-issue-avrdude-stk500-recv-programmer-is-not-respondi
Best Regards,
IoTBoys
Karthik
Your app is not available in play Store
IoT Boys
https://apkpure.com/iotboys/com.iotboys.com
Sunil
Control LED From Your Voice Command Using Arduino and HC-05 Bluetooth,how to turn off wall led even I say off it not recognising
Explain me code and how off wall led at one time
IoT Boys
Hi Sunil,
I hope now you understand everything, thanks for reaching us.
Best Regards,
IoTBoys
Surabhi Singh
Hi,
My problem is I have done all connection also my hc05 Bluetooth is connected and robot is receiving commands but nothing is happening.
youcef
i have problem that when i say on or the color of leds , it writes ” seems robot not connected”
please help me i need it
Rosina10
my problem is that the phone does not connect to the bluetooth, answer immediately, please urgently!thanks
IoT Boys
Hi Rosina,
Have you test AT commands for your HC-05 ? Please check and send us screenshot of AT Commands so that we can troubleshoot the issue.
Best Regards,
IoTBoys
https://facebook.com/iotboys
https://twitter.com/iotoboys
Jason
is there a way to just use a usb microphone instead of bluetooth?
RS Kalsi
hi my problem is the robot is receiving commands but leds dont light up
Tore
Is this app only detecting this colors or can it be used for any words?
Wanna detect all digits 0-9.
IoT Boys
Currently it’s only design for color purpose, may we will update it in future for more features.
Hans12
Sorry for the noob question but what is that black thing called thats connected to the bluetooth so that the jumper wire can connect?
deva
Really nice brother working super
Prithee
Hi,
First I thank for your great job. I need a circuit diagram not only for this project I saw many iot boys projects,you explanation, circuit description, components required,etc.. Are very good.