Control your Arduino with Voice Commands [Android App]

In this project we’re going to control an Arduino with Voice commands with a Simple android App that I’ve create with MIT App Inventor.

Watch the video below

Resources for this project:

Parts Required

You can use the preceding links or go directly to to find all the parts for your projects at the best price!

Receiver Circuit


Click here to Download the RCSwitch Library. Install it an Re-open the Arduino IDE. Then open the example “ReceiveDemo_Advanced”. Upload the code and open the serial monitor. Start pressing the buttons from the Remote you’re going to use and save them.

Final Circuit


Upload and install the source code below

  • Arduino Sketch
  • Install the RC Switch Library
  • Voice_Control.apk
  • Voice_Control.aia (to edit the android app)

Click here to download all

Note: If you want to edit my app this is what you need to do. Download Voice_Control.aia and upload it to MIT App Inventor.


  • You need to remove the RX and TX cables when you’re uploading the sketch to your Arduino.
  • Sometimes people connect the TX from the bluetooth module to the TX of the Arduino… that’s wrong and it won’t work. Make sure you connect it properly, the TX into RX and the RX into the TX.
  • If the HC-05 Bluetooth Module asks for a password, It’s ’1234′.
  • Before Testing my “BlueLED” app, test if you’ve made all the connections correctly. How you can do that? Simply enter numbers (’1′, ’0′) into your serial monitor and your LED should be turning on and off.

I hope you found this useful!

Do you have any questions? Leave a comment down below!

Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.

P.S. Click here to see how to use MIT App Inventor with Arduino

P.P.S. Click here to learn how to use the 433Mhz Transmitter/Receiver circuit to control outlets.

Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Recommended Resources

Build a Home Automation System from Scratch » With Raspberry Pi, ESP8266, Arduino, and Node-RED.

Home Automation using ESP8266 eBook and video course » Build IoT and home automation projects.

Arduino Step-by-Step Projects » Build 25 Arduino projects with our course, even with no prior experience!

What to Read Next…

Enjoyed this project? Stay updated by subscribing our newsletter!

25 thoughts on “Control your Arduino with Voice Commands [Android App]”

  1. Hi Rui!

    Do you know where I can find the Remote Controlled Sockets for 220V with Round Holes/pins (Like in Israel…)? I see in your picture you have such round holes – unlike the Amazom link you specified…


  2. It only works sending ‘1’ and ‘0’ , because i modify the program to send more ‘byte’ numbers, in this case 50 (char 2) and 51 (char 3) , but arduino only reads 1 and 0 , what can be the problem?

    I want to turn on and off a lamp (1 , 0)

    and the number 2 and 3 to ‘OPEN’ and ‘CLOSE’ a door, but dont works 🙁

    In other programs like BlueTerm arduino works perfectly to 0 – 9 chars, but in this one i cant.

    • Hi,
      This code should work almost exaclty the same, since the bluetooth modules work via serial communication.
      You might need to make a few changes to my Arduino code, but the android app should work just fine.
      I assume that your bluetooth shield as a couple of arduino code examples, take a look at them and compare with my code.
      Thanks for asking,

  3. Hi!,

    I have one problem… I am able to decode the rf signal from my remote. But if I would like to send the rf signal to my sockets, nothing happens. I tested the transmitter. He is working.
    I tried so much, but I dont know why it isnt working. I does have this sockets :

    And this rf transmitter and receiver:

      • Yes. I watched your video. Icopied the decimalcode and did paste it in the code. The rf transmitter works but my socket is still just working with the remote. I checked it with the “send demo code” of the rc switch library. So what is false? I did open One of my sockets, and tested the socket receiver. He is working. Is the output current to low for the relay?

      • Hi! I cant find a failure! Ok I actually does send this code to my arduino wich is connected to my 433 MHz Transmitter.

        #include <RCSwitch.h>

        RCSwitch mySwitch = RCSwitch();

        void setup() {



        void loop() {

          mySwitch.send(5308693, 24);
          mySwitch.send(5308692, 24);


        And this is my Received data which I received before…
        Decimal: 5308693 (24Bit) Binary: 010100010000000100010101 Tri-State: FF0F000F0FFF PulseLength: 329 microseconds Protocol: 1
        Raw data: 10228,376,932,1100,348,372,936,1096,344,372,936,376,944,376,936,1092,348,372,940,372,948,368,936,376,944,372,940,372,948,372,936,1096,344,376,940,368,948,372,940,1096,348,368,940,1092,348,372,936,1096,344,

        Decimal: 5308692 (24Bit) Binary: 010100010000000100010100 Tri-State: FF0F000F0FF0 PulseLength: 329 microseconds Protocol: 1
        Raw data: 10224,380,932,1100,340,376,936,1096,344,376,932,376,944,376,936,1096,344,376,936,372,948,372,936,376,944,372,936,376,944,376,936,1096,344,376,936,372,948,372,936,1100,344,372,940,1092,348,368,940,372,948,

  4. hi, Rui santos
    I have a problem that when i click on connect and choose the bluetooth address this massage appear to me : “Error 507: Unable to connect. Is the device turned on?

  5. thanks a lot for explanation
    it works perfect

    but I wonder is there a way to explain how you make the android app steps ?
    beacuse I wanted to modify your code
    to use more than one device and different voice commands


  6. HI rui.
    I made the reciever circuit and can run the program fine. The problem is when I open the serial monitor and press buttons on my remote nothing shows.

  7. Hello there. i was wondering if this needs an internet for the speech recognition to work? or is there a way to do this with no internet connection like offline. thanks mate for the sources.

  8. Hi Rui,
    Can you tell me which part of the code process the voice ‘ON’ and turn variable ‘state’ into 1? And also for the ‘OFF’ state?
    I can’t really understand the code


Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.