Arduino UNO + EasyVR Shield

Hi there, I am trying to command my arduino via EasyVR shield. I followed the instruction on some kind of tutorial on youtube, but I have many problems still.
Basically here’s what I’ve done:

  • Inserted six commands into Group 1 of EasyVR via Commander
  • Put the switch to SW
  • Used SoftSerial in order to be able to monitor the serial communication

Here’s my sketch. The problem is that when I enter the loop the shield always returns ‘-1’, never recognizing anything; I tried both the group 1 SD commands (which I trained) and the SI groups, but the recognition always failed.
Can anyone help me please?
Thasnk

#include <SoftwareSerial.h>

const int OUT_PIN_ST=5;
const int OUT_PIN_ED=11;
const int LED_PIN_GRN=6;
const int LED_PIN_RED=3;
const int PAUSA=5000;
const int BLINK_DELAY=500;
SoftwareSerial myserial (12,13);
//myserialSerial myserial (2,30);
//byte Serial=0;
//byte Serial=1;



void setup(){
 pinMode(OUT_PIN_ST,OUTPUT); 
 pinMode(LED_PIN_GRN,OUTPUT);
 pinMode(OUT_PIN_ED,OUTPUT);
 pinMode(LED_PIN_RED,OUTPUT);
 //pinMode(Serial,INPUT);
// pinMode(Serial,OUTPUT);

 Serial.begin(9600);
Serial.println("preinit");
 reset();
 myserial.begin(9600);
 myserial.begin(9600);
 
 delay(1000);
 myserial.print('b');
 Serial.println("init");
 int i = 0;
 for(i=0;i<100;i++){
  if(myserial.read()=='o'){
    Serial.println("awake");
   break;
  }
  delay(1); 
 }
myserial.print('x');
for(i=0; i<100; i++){
if(myserial.read()=='x'){
  Serial.println("x received");
//myserial.println("x received");
break;
   }
delay(1);
   } 
 myserial.print(' ');

for(i=0;i<100;i++){
 if(myserial.read()=='B'){
   Serial.println("ok fw");
  break;
 } 
 delay(1);
}
myserial.print('l');
myserial.print('B');
for(i=0;i<100;i++){
 if(myserial.read()=='o'){
   Serial.println("lingua");
  break;
 }
 delay(1); 
}
myserial.print('o');
myserial.print('A');
for(i=0;i<100;i++){
  if(myserial.read()=='o'){
    Serial.println("timeout");
    break;
  }
  delay(1);
}
myserial.print('d');
myserial.print('B');
Serial.println("go");
//loopo();
}

void loop(){
Serial.println(myserial.read());
if(myserial.read()=='s'||myserial.read()=='r'){
  Serial.println("similar");
 delay(100);
myserial.print(' '); 
}
if(myserial.read()=='A'||myserial.read()=='B'||myserial.read()=='C'||myserial.read()=='D'
||myserial.read()=='E'||myserial.read()=='F'){
  Serial.println(myserial.read());
  Serial.println("ok");
 program(); 
}
if(myserial.read()=='t'||myserial.read()=='e'){
  Serial.println("error");
 reset(); 
}
}
void dimLed(int ledPin){
  for(int fadeValue = 255 ; fadeValue >=0; fadeValue -=5) { 
    // sets the value (range from 0 to 255):
    analogWrite(ledPin, fadeValue);         
    // wait for 30 milliseconds to see the dimming effect    
    delay(50);  
  }
}
void ampLed(int ledPin){
  for(int fadeValue = 0 ; fadeValue !=255; fadeValue +=5) { 
    // sets the value (range from 0 to 255):
    analogWrite(ledPin, fadeValue);         
    // wait for 30 milliseconds to see the dimming effect    
    delay(50);  
  }
}
void blinkLed(int ledPin, int delayTime, int totalTime){
  int time=0;
  while(time<=totalTime){
    digitalWrite(ledPin,HIGH);
    delay(delayTime);
    digitalWrite(ledPin,LOW);
    delay(delayTime);
    time+=2*delayTime;
  }
}

void program(){
 digitalWrite(OUT_PIN_ST, HIGH);
 delay(PAUSA/2);
 digitalWrite(OUT_PIN_ST,LOW);
 ampLed(LED_PIN_GRN);
 delay(PAUSA);
  dimLed(LED_PIN_GRN);
 ampLed(LED_PIN_RED);
 delay(PAUSA);
 blinkLed(LED_PIN_RED,BLINK_DELAY,PAUSA);
 digitalWrite(OUT_PIN_ED,HIGH);
 delay(PAUSA/2);
 digitalWrite(OUT_PIN_ED,LOW);
 unfuse();
}
void reset(){
 myserial.print('d');
 myserial.print('B'); 
}
void unfuse(){
 myserial.print('s');
 myserial.print('A'); 
}
SoftwareSerial myserial (12,13);

Do you really have a myserial attached to those pins? Is there some reason not to use a meaningful name for the instance?

 myserial.begin(9600);
 myserial.begin(9600);

Maybe you need to do this 4 or 5 times, instead of just twice.

Serial.println(myserial.read());
if(myserial.read()=='s'||myserial.read()=='r'){
  Serial.println("similar");
 delay(100);
myserial.print(' '); 
}

Read, and do nothing more than print, if you are lucky enough to have read one, a character. Then, read another one, and do something with it. Why?

Hello,

I have an Arduino MEGA 2560 and the EasyVR shield. When I use EasyVR Commander, I can only train the trigger command. Everything else I try to train it tells me "Training Error: Recognition Failed".
This is the only issue I'm having since I can test the trigger command as well as the wordlist. I even tried using the same command on the group lists but even that tells me the message.

Any help is appreciated.