Introduction: Voice Activated LEDs

About: Webduino was launched by our team in 2015. With the great passion and deep dedication, we not only successfully launched the service but also had the strong presence in Taiwan. Moreover, we expand our innovati…

Webduino uses the Chrome internet browser to control all sorts of electronic components, so we should be able to use all other functions that Chrome has to offer. In this project example we will use Chrome's Speech API. Using Google's voice recognition, we can easily control an LED light. The same method could be used with a relay, allowing us to control a light bulb, door lock, or house appliances.

Full text of this project :

Webduino Blockly :

Step 1: Wiring and Practice

The longer leg goes to high potential (pins that have a number) and the shorter leg goes to low potential (GND). For this tutorial, connect the longer leg to 10 and the shorter leg to GND.

Step 2: Open Webduino Blockly and Use Web Demo Area.

Open the Webduino Blocky Editor, and click on the "Web Demo Area" button, click on the drop down menu and choose "Show Text".

Step 3: Place a "Board" Into the Workspace, Fill in the Name of Board. Place an "LED" Block Into the Stack.

Step 4: ​Click on "Voice Control" and Place the "Start Recognition" Block Into the Stack.

Voice recognition can only work with one language at a time (here we can choose Mandarin or English).

Step 5: Define the "interimResults" on the "Voice Control" Block to Control How We Want the Voice Recognition to Read Our Speech.

If it is set to "on" it will recognize every word spoken, and if it is set to "off" it will recognize pauses creating sentences. If you are using a browser on a computer, we recommend setting it to "on", so you will receive better results. If you are using a mobile phone, set it to "off". The speech recognition will only work for phones that run on Android.

Step 6: Place a "Show Text" Block With an "Recognized Text" and Set the Rules of Recognition.

Then place an "if word include / do" block inside the "Recognition" block to program an action. In the example, we make an LED turn on and off when we say "turn on the lights" and "turn off the lights". Or, if we say "blink" the LED will flash.

Step 7: If You Need Multiple Commands, Use a "List" Block.

Step 8: Check If the Board Is Online and "Run Blocks". Then "Allow" Chrome to Use Your Microphone.

Read more tutorials of Webduino here.