Controlling a device with Arduino UNO using voice seems difficult and impossible. But no worries, now we can control the UNO using our voice with the help of Arduino Voice Control Apps and Bluetooth HC-06. This apps is free and available in playstore.
Required Components:
1. Arduino UNO.
2. Bluetooth HC-06.
3. Red LED.
4. Green LED.
5 Yellow LED.
6. 220 ohm Resistor x 3.
7. Male to Male Jumper Wires.
8. Breadboard.
Circuit connection based on the diagram below.
1. HC-06 : VCC Arduino UNO: 5V
2. HC-06 : GND Arduino UNO: GND
3. HC-06 : RX Arduino UNO: pin 11
4. HC-06 : TX Arduino UNO: pin 10
5. Yellow LED (+) Arduino UNO: pin 2
6. Red LED (+) ArduinoUNO: pin 3
7. Green LED (+) Arduino UNO: pin 4
8. Yellow LED (-) Arduino UNO: GND with Resistor
9. Red LED (-) Arduino UNO: GND with Resistor
10. Greed LED (-) Arduino UNO: GND with Resistor
ARDUINO VOICE CONTROL:
Download from the Playstore.
App Settings.
These are the output of the Arduino based on the voice input through the apps.
S NO | INPUT VOICE | OUTPUT |
1 | on | on All LED turn on |
2 | off | All LED turn off |
3 | yellow on | Yellow LED turn on |
4 | yellow off | Yellow LED turn off |
5 | red on | Red LED turn on |
6 | red off | Red LED turn off |
7 | green | on Green LED turn on |
8 | green off | Green LED turn off |
ARDUINO CODE:
#include <SoftwareSerial.h> SoftwareSerial HC06Serial(10, 11); // (RX,TX) String value; int yellow = 2; int red = 3; int green = 4; void setup() { pinMode(yellow, OUTPUT); pinMode(red, OUTPUT); pinMode(green, OUTPUT); Serial.begin(9600); // start serial communication at 9600bps HC06Serial.begin(9600); } void loop() { Serial.println(value); if (HC06Serial.available()) { value = HC06Serial.readString(); if (value == "on") { digitalWrite(yellow, HIGH); digitalWrite(red, HIGH); digitalWrite(green, HIGH); } if (value == "off") { digitalWrite(yellow, LOW); digitalWrite(red, LOW); digitalWrite(green, LOW); } if (value == "yellow on") { digitalWrite(yellow, HIGH); } if (value == "red on") { digitalWrite(red, HIGH); } if (value == "green on") { digitalWrite(green, HIGH); } if (value == "yellow off") { digitalWrite(yellow, LOW); } if (value == "red off") { digitalWrite(red, LOW); } if (value == "green off") { digitalWrite(green, LOW); } } }