Control Devices by Voice Command Using Android and Arduino

Introduction: Control Devices by Voice Command Using Android and Arduino

About: I make hobbyist stuffs and play with electronics follow me to know more https://www.facebook.com/arduinolabviewsolidworks https://twitter.com/learnrobotix

This ible will serve questions like, How to control devices by voice commands , speech recognition available in android.

All the android devices comes with the inbuilt speech recognition. This can be used to convert speech to text, by calling bluetooth function these text can be sent to device in this case the text were transferred to an arduino. The app can made with ease in MIT app inventor Without any experience in programming.

Step 1: How to Create Voice to Text App

follow the video to know how to create an android app . using MIT app inventor

Step 2: Lets Control Some Electrical Devices

Connect any of your electrical appliances to an arduino with the help of relay.

Arduino Program.

#include

SoftwareSerial BT(10, 11); //TX, RX respetively

String device;

void setup() {

BT.begin(9600);

Serial.begin(9600);

pinMode(3, OUTPUT);

pinMode(4, OUTPUT);

pinMode(5, OUTPUT); }

//-----------------------------------------------------------------------//

void loop() {

while (BT.available()){ //Check if there is an available byte to read

delay(10); //Delay added to make thing stable

char c = BT.read(); //Conduct a serial read

device += c; //build the string. }

if (device.length() > 0) {

Serial.println(device);

if(device == "light on") {

digitalWrite(3, HIGH); }

else if(device == "light off") {

digitalWrite(3, LOW); }

else if (device == "tv on") {

digitalWrite (4,HIGH); }

else if ( device == "tv off") {

digitalWrite (4, LOW); }

else if (device == "fab on") {

digitalWrite (5, HIGH); }

else if (device == "fan off") {

digitalWrite (5, LOW);}

device="";}} //Reset the variable

______________________________________________________________________________________________


I've used voice commands like "light on" "light off", "tv on" "tv off"', instead of these command we can change the commands to our wish and execute the program.


Step 3: How the Electrical Devices Works by This App.

Step 4: Lets Control a Robot From This App

check out this ible to know circuit diagram for the robot. https://www.instructables.com/id/How-to-make-a-voice-control-direction-control-remo/

Share

    Recommendations

    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Metalworking Contest

      Metalworking Contest

    3 Discussions

    when i compile the program it show errors

    please help me its urjent

    0
    None
    tinapa

    2 years ago

    i made this app but it is showing error 503,not a valid bluetooth MAC address.please help me out with this

    Thanks a lot! Clear and smart project! And thanks also for the explanation for how to do the Android App, many others instructions keep it secret or simply redirect to a Google Store download; instead you match the real philosophy of Arduino projects: share it !!!