EasyVR Help

Hi this post is targeted at those who have worked with the easyvr module

Could someone please give me an example code that they use or have used in the past, that lights up an led when a word is said, for example saying one will light up a certain led, and saying two will light up another led and so on.

I need this code because I have written a line of code and cannot seem to make it work, I just want to see what things I need to add and also test my module is wired correctly to the board.

Thank you


hi i am also having the same problem as you, so i thougth that the code that i have edited may help in some way,

#include <SoftwareSerial.h>		// communicate with VRBOT

int i;
char reader;
int rx = 0; // pin used to receive from EasyVR
int tx = 1; // pin used to send to EasyVR
SoftwareSerial serial_vr(rx, tx); // new serial port on pins 2 and 3
void setup()
  for(i=2; i=11; i++)			//set up all 10 Pins for outputs leave pin 0 and 1 for serial communication
    pinMode(i, OUTPUT);		//from the computer. Used for debugging.
  reset();					// sub rutin resets, put all pins to low.
  serial_vr.begin(9600); // initialize the port, EasyVR at power on uses 9600 baud, 8 bit, no parity, 1 stop bit
  delay(1000);				//One Second Delay.
  tx <<('b');				//sending a b wakes up the VRBOT. Recommended..
  for (i=0;i<100;i++){			//no buffer, so we have to listen to pin and catch it right away because if a bit flys into a software pin it's not going to stay 
      if (rx =='o'){			//the for loop will do this 100 to catch the b and it will send a o if it is a success
      break;					//break the the loop.
    delay(1);        // 1 ms delay
  tx <<('x');				//Transmit the X to confirm a firmware I.D. Check
  for(i=0; i<100;i++){
    if(rx =='x'){
      Serial.println('x received');		//Should get X when success.
  tx << (' ');				//send space so that it can acknowledge and you can recieve another byte.
  for (i=0; i<100; i++) {
    if(rx =='A') {			//Next bit recieve is a A 
      Serial.println("firmware good");        //let us know firmware is in.
  } //for 
  tx << ('l');				//setting up the language, send l to select langage
  rx << ('A');                         // A=0 for English
  for(i=0;i<100; i++) {
    if(rx =='o') {                // o for success
      Serial.println("language set");      // language set is a success
  } // for
  tx <<('o');          // send o for timeout
  rx << ('A');            // A = 0 infinite "always listen"
  for(i=0;i<100;i++) {
    if(rx =='o') {      // o for success
      Serial.println ("Infinited Timeout");
  } // for
  tx << ('i');    // command recognition SI (any of the wordsets)
  tx << ('D');      // D = 3 for wordset 3
  Serial.println ( "Wordset 1");     // nothing back now it's listening

} // setup
void loop()
  reader=rx;      // constantly reading what is coming out of the rx 
  if (reader=='s') {      // recognize word
    delay (100); 
    tx << (' ');       // space acknowledge s, then it will send out a letter anwhere from A-K, 0-10
  } // read 
  {    // send letter B 
    reset (); 
    digitalWrite (2, HIGH);    // resets sets all pins low
  if (reader=='C') {
    reset ();
    digitalWrite (3, HIGH);
  if(reader=='t')    // t is timeout error
    reset ();
  if(reader=='e')    // e is all other errors
    reset (); 

} // loop

void reset(){
  for(i=2; i<=11; i++)
    digitalWrite (i, LOW);
  delay (100);
  tx << ('i');     // send i and D to put vrbot back in listening mode
  tx << ('D');