48

Arduino: Speech control with the EasyVR Shield

Geschrieben von: SES am 19.03.2012 um 20:52 pm

Introduction

Recently I’ve found an quite interesting Arduino shield on: http://www.veear.eu/Products/EasyVRShield.aspx. Using this shield you can control your Arduino using speech commands.

The shield consists of these components:
- EasyVR Arduino Shield (includes EasyVR module)
- Microphone

On the website you can also find following free software downloads (see link above):
- User manual
- EasyVR Commander
- Arduino Libraries

Following shops sell the EasyVR shield: http://www.veear.eu/WheretoBuy.aspx
It costs around 40€ or 50$.


Demo

In this demo I control a LED with my voice and the EasyVR shield.

For this demo I also use an Arduino, that has been kindly provided by Farnell.com.

Overview Arduino: http://de.farnell.com/arduino
Arduino schematic: http://arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf
Link to product page: http://de.farnell.com/arduino/a000046/board-arduino-uno/dp/1848687?ICID=i-9ec8-00001000

Step 1: Software Installation

Install the “EasyVR Commander” software [Link].
Before you run the software, make sure you run the program with administrator privileges.
But don’t start the software at the moment.

Step 2: Prepare hardware

Put the shield and the Arduino together and connect the mic to the shield (J11).
Put Jumper J12 at position “PC”.
Connect the Arduino to the PC via USB.

Step 3: Train the EasyVR Shield

Now run “EasyVR Commander” and connect to the serial port of the Arduino USB connection.
Click in the group list on Index 0 – Trigger. Add a new command, name it e.g. “ARDUINO”. Then click on “Train Command”. And speak the word “Arduino” in the mic. And a second time, when the software tells you so.

Click in the group list on Index 1 – Group. Add a new command, name it e.g. “LED_ON”. Then click on “Train Command”. And speak the words “LED on” in the mic. And a second time, when the software tells you so.
And add a second command “LED_OFF” and train this command as well.

Note: LED_AN is LED_ON and LED_AUS is LED_OFF.

Now your EasyVR is configured. We finally generate some code for the microcontroller inside of the Arduino. In EasyVR Commander click on File->Generate code.

Disconnect your Arduino from USB and change jumper J12 to SW.

Step 4: Some Arduino code

Install the EasyVR Arduino libraries (see first link) to the Arduino IDE library folder.

I slightly altered the previously generated code to control a LED. The LED is connected to pin 11:

#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
  #include "SoftwareSerial.h"
  SoftwareSerial port(12,13);
#else // Arduino 0022 - use modified NewSoftSerial
  #include "WProgram.h"
  #include "NewSoftSerial.h"
  NewSoftSerial port(12,13);
#endif

#include "EasyVR.h"
EasyVR easyvr(port);

//Groups and Commands
enum Groups
{
  GROUP_0  = 0,
  GROUP_1  = 1,
};

enum Group0 
{
  G0_ARDUINO = 0,
};

enum Group1 
{
  G1_LED_AN = 0,
  G1_LED_AUS = 1,
};


EasyVRBridge bridge;

int8_t group, idx;

void setup()
{
  // bridge mode?
  if (bridge.check())
  {
    cli();
    bridge.loop(0, 1, 12, 13);
  }
  // run normally
  Serial.begin(9600);
  port.begin(9600);

  if (!easyvr.detect())
  {
    Serial.println("EasyVR not detected!");
    for (;;);
  }

  easyvr.setPinOutput(EasyVR::IO1, LOW);
  Serial.println("EasyVR detected!");
  easyvr.setTimeout(5);
  easyvr.setLanguage(3);

  group = EasyVR::TRIGGER; //<-- start group (customize)
  
  
  pinMode(11, OUTPUT); 
  digitalWrite(11, LOW);    // set the LED off
  
}

void action();

void loop()
{
  easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)

  Serial.print("Say a command in Group ");
  Serial.println(group);
  easyvr.recognizeCommand(group);

  do
  {
    // can do some processing while waiting for a spoken command
  }
  while (!easyvr.hasFinished());
  
  easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off

  idx = easyvr.getWord();
  if (idx >= 0)
  {
    // built-in trigger (ROBOT)
    // group = GROUP_X; <-- jump to another group X
    return;
  }
  idx = easyvr.getCommand();
  if (idx >= 0)
  {
    // print debug message
    uint8_t train = 0;
    char name[32];
    Serial.print("Command: ");
    Serial.print(idx);
    if (easyvr.dumpCommand(group, idx, name, train))
    {
      Serial.print(" = ");
      Serial.println(name);
    }
    else
      Serial.println();
    easyvr.playSound(0, EasyVR::VOL_FULL);
    // perform some action
    action();
  }
  else // errors or timeout
  {
    if (easyvr.isTimeout())
      Serial.println("Timed out, try again...");
    int16_t err = easyvr.getError();
    if (err >= 0)
    {
      Serial.print("Error ");
      Serial.println(err, HEX);
    }
    
    
    group = GROUP_0;
  }
}

void action()
{
    switch (group)
    {
    case GROUP_0:
      switch (idx)
      {
      case G0_ARDUINO:
        // write your action code here
          group = GROUP_1; //<-- or jump to another group X for composite commands
        break;
      }
      break;
    case GROUP_1:
      switch (idx)
      {
      case G1_LED_AN:
        // write your action code here
        group = GROUP_0; //<-- or jump to another group X for composite commands
        
        digitalWrite(11, HIGH);   // set the LED on
        
        break;
      case G1_LED_AUS:
        // write your action code here
        group = GROUP_0; //<-- or jump to another group X for composite commands
        digitalWrite(11, LOW);    // set the LED off
        
        break;
      }
      break;
    }
}

Compile and upload this code. Your Arduino should now do something like this:

48 Antworten auf “Arduino: Speech control with the EasyVR Shield”

  1. arton sagt:

    can u help with my program is simular to your i have a trigger activate sound sensor, to commands activate and decativate switch but i cant upload my program on arduino can u see where i have gone wrong . when i try your program it doesnt like NewSoftSerial port because it does have a type

    #include
    NewSoftSerial port(12,13);

    #include
    EasyVR easyvr(port);

    //Groups and Commands
    enum Groups
    {
    GROUP_0 = 0,
    GROUP_1 = 1,
    };

    enum Group0
    {
    G0_ACTIVATE_SND_SENSOR = 0,
    };

    enum Group1
    {
    G1_ACTIVATE = 0,
    G1_DEACTIVATE_SWITCH = 1,
    };

    EasyVRBridge bridge;

    int8_t group, idx;

    void setup()
    {
    // bridge mode?
    if (bridge.check())
    {
    cli();
    bridge.loop(0, 1, 12, 13);
    }
    // run normally
    Serial.begin(9600);
    port.begin(9600);

    if (!easyvr.detect())
    {
    Serial.println(“EasyVR not detected!”);
    for (;;);
    }

    easyvr.setPinOutput(EasyVR::IO1, LOW);
    Serial.println(“EasyVR detected!”);
    easyvr.setTimeout(5);
    easyvr.setLanguage(0);

    group = EasyVR::TRIGGER; //= 0)
    {
    // built-in trigger (ROBOT)
    // group = GROUP_X; = 0)
    {
    // print debug message
    uint8_t train = 0;
    char name[32];
    Serial.print(“Command: “);
    Serial.print(idx);
    if (easyvr.dumpCommand(group, idx, name, train))
    {
    Serial.print(” = “);
    Serial.println(name);
    }
    else
    Serial.println();
    easyvr.playSound(0, EasyVR::VOL_FULL);
    // perform some action
    action();
    }
    else // errors or timeout
    {
    if (easyvr.isTimeout())
    Serial.println(“Timed out, try again…”);
    int16_t err = easyvr.getError();
    if (err >= 0)
    {
    Serial.print(“Error “);
    Serial.println(err, HEX);
    }
    }
    }

    void action()
    {
    switch (group)
    {
    case GROUP_0:
    switch (idx)
    {
    case G0_ACTIVATE_SND_SENSOR:
    // write your action code here
    // group = GROUP_X; <– or jump to another group X for composite commands
    break;
    }
    break;
    case GROUP_1:
    switch (idx)
    {
    case G1_ACTIVATE:
    // write your action code here
    group = GROUP_0; //<– or jump to another group X for composite commands

    digitalWrite(11, HIGH); // set the LED on

    break;
    case G1_DEACTIVATE_SWITCH:
    // write your action code here
    group = GROUP_0; //<– or jump to another group X for composite commands
    digitalWrite(11, LOW); // set the LED off

    break;
    }
    break;
    }
    }

  2. uzma sagt:

    hello..
    i am new to this easyvr and need help for connecting arduino uno with easyvr..
    i am not using shield..

  3. SES sagt:

    @uzma:
    that’s eays, have a look at this pdf, on page 11:
    http://download.tigal.com/veear/EasyVR_User_Manual_3.3.pdf

  4. SES sagt:

    @arton: if you have the easyvr shield, you should try a different jumper setting on jumper J12

    see page 17: http://download.tigal.com/veear/EasyVR_User_Manual_3.3.pdf

  5. [...] Wrote in to tell us about this article about using the Arduino EasyVR shield to add voice control to your project. Worth a look if it your application calls for [...]

  6. [...] Wrote in to tell us about this article about using the Arduino EasyVR shield to add voice control to your project. Worth a look if it your application calls for [...]

  7. gogy sagt:

    say me “easyvr not detected” help me please

  8. SES sagt:

    @gogy: did you checked the manual? what configuration do you have – easy vr-shield + arduino or direct connection between the easy vr board and the arduino?

  9. gogy sagt:

    the second

  10. gogy sagt:

    hello, how do I configurer this in terminal? excuse my english is bad

  11. KK sagt:

    Do you used the arduino software or another program to upload the sample program to the microcontroller?

  12. I live in Brazil, I don’t speak very well English and I am using translator ” Globalink ” and I am with difficulties of doing the recording of the sound table in my easyvr shield, and in spite of following the instructions of the video in the site http://www.youtube.com/watch?v=SThR-jyoplk..
    I used the program of sound ” compress Sensory quickSynthesis 5 “, as taught in the video, jumper position ” UP “, and downloads for the program Easy VR shield, however i am not getting to do the transfer of the sound for the easyvr shield, when I change the jumper for position ” PC ” the sound table it doesn’t show up in the program Easyvr Comander left side in the end indicating that was not recorded.

    Thank you for the attention and for the help

  13. Gurmail Khela sagt:

    Hi
    I have bought the EasyVR and Arduino shield
    do not have any program experience

    like your program to control LED with voice command
    could give the program code i can use to do this with my EasyVR
    I copied your program but did hot work with voice
    everything worked up generating code in the commander

    Thank you so much

  14. Dzzy sagt:

    im getting a error Easy.h has not been declared. im lost
    #if defined(ARDUINO) && ARDUINO >= 100
    #include “Arduino.h”
    #include “SoftwareSerial.h”
    SoftwareSerial port(12,13);
    #else // Arduino 0022 – use modified NewSoftSerial
    #include “WProgram.h”
    #include “NewSoftSerial.h”
    NewSoftSerial port(12,13);
    #endif

    #include “EasyVR.h”
    EasyVR easyvr(port);

    //Groups and Commands
    enum Groups
    {
    GROUP_0 = 0,
    GROUP_1 = 1,
    };

    enum Group0
    {
    G0_ARDUINO = 0,
    };

    enum Group1
    {
    G1_LED_ON = 0,
    G1_LED_OFF = 1,
    };

    EasyVRBridge bridge;

    int8_t group, idx;

    void setup()
    {
    // bridge mode?
    if (bridge.check())
    {
    cli();
    bridge.loop(0, 1, 12, 13);
    }
    // run normally
    Serial.begin(9600);
    port.begin(9600);

    if (!easyvr.detect())
    {
    Serial.println(“EasyVR not detected!”);
    for (;;);
    }

    easyvr.setPinOutput(EasyVR::IO1, LOW);
    Serial.println(“EasyVR detected!”);
    easyvr.setTimeout(5);
    easyvr.setLanguage(0);

    group = EasyVR::TRIGGER; //= 0)
    {
    // built-in trigger (ROBOT)
    // group = GROUP_X; = 0)
    {
    // print debug message
    uint8_t train = 0;
    char name[32];
    Serial.print(“Command: “);
    Serial.print(idx);
    if (easyvr.dumpCommand(group, idx, name, train))
    {
    Serial.print(” = “);
    Serial.println(name);
    }
    else
    Serial.println();
    easyvr.playSound(0, EasyVR::VOL_FULL);
    // perform some action
    action();
    }
    else // errors or timeout
    {
    if (easyvr.isTimeout())
    Serial.println(“Timed out, try again…”);
    int16_t err = easyvr.getError();
    if (err >= 0)
    {
    Serial.print(“Error “);
    Serial.println(err, HEX);
    }
    }
    }

    void action()
    {
    switch (group)
    {
    case GROUP_0:
    switch (idx)
    {
    case G0_ARDUINO:
    // write your action code here
    // group = GROUP_X; <– or jump to another group X for composite commands
    break;
    }
    break;
    case GROUP_1:
    switch (idx)
    {
    case G1_LED_ON:
    // write your action code here
    // group = GROUP_X; <– or jump to another group X for composite commands
    break;
    case G1_LED_OFF:
    // write your action code here
    // group = GROUP_X; <– or jump to another group X for composite commands
    break;
    }
    break;
    }
    }

  15. yusuf sagt:

    hello, I do copy your code but I failed to compile it. the error ‘ ‘cli’ is not declare in this scope ‘ appear. I’ve tried to find out the problem but I still cant get it. will you help me on this problem?
    thank you. :D

  16. SES sagt:

    @yusuf: you may find this website useful: http://www.arduino.cc/playground/Main/AVR

    It explains the cli() and sei() function.

  17. Eric sagt:

    I am trying to upload your code to my arduino but it says ‘NewSoftSerial’ does not name a type’

    any ideas on how to fix this?

  18. Luca sagt:

    Hi!!! I’m in trouble with first test on arduino… on commander it’s all ok, but when i try to test with example sketch, on the serial monitor says “EasyVR not detected!” what can be wrong? Sorry… if someone can help me, can reply me by mail? nytro1981@gmail.com thanks!!!!!

  19. Ivan Haruo Kamimura sagt:

    Hi, I´m brazilian. My english isnt good, sry for that! So I´m had trouble using this code, so i tried to repair what is gone wrong… and I got it!
    &lt;– I don´t know what it means but by the way it works.

    here is the code:

    #if defined(ARDUINO)&&ARDUINO>= 100
    #include “Arduino.h”
    #include “SoftwareSerial.h”
    SoftwareSerial port(12,13);
    #else // Arduino 0022 – use modified NewSoftSerial
    #include “WProgram.h”
    #include “NewSoftSerial.h”
    NewSoftSerial port(12,13);
    #endif

    #include “EasyVR.h”
    EasyVR easyvr(port);

    //Groups and Commands
    enum Groups
    {
    GROUP_0 = 0,
    GROUP_1 = 1,
    };
    enum Group0
    {
    G0_ARDUINO = 0,
    };
    enum Group1
    {
    G1_LED_AN = 0,
    G1_LED_AUS = 1,
    };
    EasyVRBridge bridge;
    int8_t group, idx;
    void setup()
    {
    // bridge mode?
    if (bridge.check())
    {
    cli();
    bridge.loop(0, 1, 12, 13);
    }
    // run normally
    Serial.begin(9600);
    port.begin(9600);
    if (!easyvr.detect())
    {
    Serial.println(“EasyVR not detected!”);
    for (;;);
    }
    easyvr.setPinOutput(EasyVR::IO1, LOW);
    Serial.println(“EasyVR detected!”);
    easyvr.setTimeout(5);
    easyvr.setLanguage(3);
    group = EasyVR::TRIGGER; //&lt;– start group (customize)
    pinMode(11, OUTPUT);
    digitalWrite(11, LOW); // set the LED off
    }
    void action();
    void loop()
    {
    easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)
    Serial.print(“Say a command in Group”);
    Serial.println(group);
    easyvr.recognizeCommand(group);
    do
    {
    // can do some processing while waiting for a spoken command
    }
    while (!easyvr.hasFinished());
    easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off
    idx = easyvr.getWord();
    if (idx>= 0)
    {
    // built-in trigger (ROBOT)
    // group = GROUP_X; &lt;– jump to another group X
    return;
    }
    idx = easyvr.getCommand();
    if (idx>= 0)
    {
    // print debug message
    uint8_t train = 0;
    char name[32];
    Serial.print(“Command:”);
    Serial.print(idx);
    if (easyvr.dumpCommand(group, idx, name, train))
    {
    Serial.print(“=”);
    Serial.println(name);
    }
    else
    Serial.println();
    easyvr.playSound(0, EasyVR::VOL_FULL);
    // perform some action
    action();
    }
    else // errors or timeout
    {
    if (easyvr.isTimeout())
    Serial.println(“Timed out, try again…”);
    int16_t err = easyvr.getError();
    if (idx>= 0)
    {
    Serial.print(“Error”);
    Serial.println(err, HEX);
    }
    group = GROUP_0;
    }
    }
    void action()
    {
    switch (group)
    {
    case GROUP_0:
    switch (idx)
    {
    case G0_ARDUINO:
    // write your action code here
    group = GROUP_1; //&lt;– or jump to another group X for composite commands
    break;
    }
    break;
    case GROUP_1:
    switch (idx)
    {
    case G1_LED_AN:
    // write your action code here
    group = GROUP_0; //&lt;– or jump to another group X for composite commands
    digitalWrite(11, HIGH); // set the LED on
    break;
    case G1_LED_AUS:
    // write your action code here
    group = GROUP_0; //&lt;– or jump to another group X for composite commands
    digitalWrite(11, LOW); // set the LED off
    break;
    }
    break;
    }
    }

  20. Ivan Haruo Kamimura sagt:

    Hi again! I tested my own code by copying from this site but I discovered a problem. The problem is using control+c control+v to arduino IDE doesnt work. this site have a problem about simbols. (“) is the problem. so if you replace all (“) of my code again, you will see the word on the IDE will turn to blue color than black.

  21. yusuf sagt:

    oh thankyou, I manage to try this code when im move the library correctly. thank you.

  22. saad sagt:

    Can someone help me how to interface easyvr with arduino uno module because i am error of bridge connection

  23. ema sagt:

    Hello, can someone help me! I will make abraille learning board with 2 braille cells each cell consists of 6 dots the user must press on the buttons(raised dots) to make aletter or number and combine them to make words…. The output must be voice only.How can I use arduino to make the voice output.

  24. miari sagt:

    i want to ask what is the software that i should use for coding, im new with arduino!!!

  25. azerty sagt:

    Hi,
    Can someone help me to compile the code with a Teensy board instead of an Arduino???
    Thank you so much.

  26. Amal sagt:

    (“) is the problem. so if you replace all (“) of my code again, you will see the word on the IDE will turn to blue color than black.
    i do this and the color become blue but in compiler there is a problem ” conflicting declaration ‘softwareserial port’ how cani resolve it ?

  27. Amal sagt:

    finally, i upload the program but the led is on all the time and doesn’t response to voice ,what’s the problem ? and after uploading i change the mode of j12 or keep it in sw mode

  28. Albert sagt:

    Hi,

    so this is funny, when I say led_off arduino turns the led ON! and when I say ON it turns the led OFF! hmmmm this is so funny. here my code:
    (the led is on from the beginning!)
    hope you can find the little devil ;-)

    #if defined(ARDUINO) && ARDUINO >= 100
    #include “Arduino.h”
    #include “SoftwareSerial.h”
    SoftwareSerial port(12,13);
    #else // Arduino 0022 – use modified NewSoftSerial
    #include “WProgram.h”
    #include “NewSoftSerial.h”
    NewSoftSerial port(12,13);
    #endif

    #include “EasyVR.h”
    EasyVR easyvr(port);

    //Groups and Commands
    enum Groups
    {
    GROUP_0 = 0,
    GROUP_1 = 1,
    };

    enum Group0
    {
    G0_DAVID = 0,
    };

    enum Group1
    {
    G1_LED_AN = 0,
    G1_LED_AUS = 1,
    };

    EasyVRBridge bridge;

    int8_t group, idx;

    void setup()
    {
    // bridge mode?
    if (bridge.check())
    {
    cli();
    bridge.loop(0, 1, 12, 13);
    }
    // run normally
    Serial.begin(9600);
    port.begin(9600);

    if (!easyvr.detect())
    {
    Serial.println(“EasyVR not detected!”);
    for (;;);
    }

    easyvr.setPinOutput(EasyVR::IO1, LOW);
    Serial.println(“EasyVR detected!”);
    easyvr.setTimeout(10);
    easyvr.setLanguage(3);

    group = EasyVR::TRIGGER; //= 0)
    {
    // built-in trigger (ROBOT)
    // group = GROUP_X; = 0)
    {
    // print debug message
    uint8_t train = 0;
    char name[32];
    Serial.print(“Command: “);
    Serial.print(idx);
    if (easyvr.dumpCommand(group, idx, name, train))
    {
    Serial.print(” = “);
    Serial.println(name);
    }
    else
    Serial.println();
    easyvr.playSound(0, EasyVR::VOL_FULL);
    // perform some action
    action();
    }
    else // errors or timeout
    {
    if (easyvr.isTimeout())
    Serial.println(“Timed out, try again…”);
    int16_t err = easyvr.getError();
    if (err >= 0)
    {
    Serial.print(“Error “);
    Serial.println(err, HEX);
    }
    }
    }

    void action()
    {
    switch (group)
    {
    case GROUP_0:
    switch (idx)
    {
    case G0_DAVID:
    // write your action code here
    group = GROUP_1;
    break;
    }
    break;
    case GROUP_1:
    switch (idx)
    {
    case G1_LED_AN:
    group = GROUP_0; //&lt;– or jump to another group X for composite commands

    digitalWrite(11, HIGH);
    break;
    case G1_LED_AUS:
    group = GROUP_0; //&lt;– or jump to another group X for composite commands
    digitalWrite(11, LOW); // set the LED off
    break;
    }
    break;
    }
    }

  29. SES sagt:

    @Albert: How did you connect the LED? K to GND and A to the digital output?

  30. Christian sagt:

    “NewSoftSerial” does not name a type
    I installed easy vr libraries, I restarted the arduino application, but still it doesnt work
    How can i solve this?

  31. praveen reddy sagt:

    hi…,i purchased EASY VR alone with out shield…,i’mm working on it with AURDINO NANO. i’m unable to program the easy vr alone with aurdino..
    can the “easy vr shield” program can be used for EASY VR alone connected to “aurdino nano”….? please guide me…..!

  32. praveen reddy sagt:

    hi….i purchased easy vr alone and i dont have easy vr shield. i’m trying to interface the easy vr with arudino nano. can i use your program for the easy vr alone with out any shield.please guide me so that i can move ahead.
    waiting for your reply.
    your bro-praveen reddy

  33. SES sagt:

    @praveen: hey, look at the manual, at page 13 (http://download.tigal.com/veear/EasyVR_User_Manual_3.4.2.pdf), this should help.

  34. zoky sagt:

    How to put the EASY VR module in sleep mode…? Help.

  35. Waqas sagt:

    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.

  36. Thierry78 sagt:

    The same error as for LUCA.
    Easyvr not detected:
    Everything complie, works and all other software are OK…but not the easyvr.
    It seems EasyVr is shit…very very sensitive…and mybe broken.
    Lots of people have the same errors but nobody knows the answer…

  37. Elsa sagt:

    Hello,
    I’m making a project with an easyvr voice recognition module to make a robot store and give things. Do you think that it is possible to make a command to make the robot record a new command ? for example, when somebody gives it an apple, he says “apple” and the robot puts the apple on a free place and makes a new command. When the user says again “apple” (or “give me the apple”), the robot should remember where he stored it and give it to the user.
    Do you think that it is possible with the easyvr please ?

    Thank you very much !
    (sorry my english is bad I’m French)

  38. SES sagt:

    @Elsa: Hi Elsa,
    I think, this might be too diffucult. You always have to use the PC software to teach new words. Maybe you can ask the manufacturer, what they would do?

  39. Elsa sagt:

    @SES
    Hi SES,
    There is a programm I think would work :
    page 28 of the User Manual :
    http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Shields/EasyVR_User_Manual_3.3.pdf
    But I don’t know if it works with the arduino…
    below page 35, there is somrthing with arduino but I don’t know how to make the programm…

  40. BeEasy114 sagt:

    Nice tutorial I’ve had a headache for the last 2 days fiddling over getting my EasyVR to work with my shield because no explains the coding. Great code. 5 Star Results!!

  41. BeEasy114 sagt:

    arton you have Arduino 1.0 you need to go delete NewSoftSerial and SoftwareSerial folders ion your library.

    Delete Documents/Arduino/libraries/SoftwareSerial
    Delete Documents/Arduino/libraries/NewSoftSerial

    http://forum.arduino.cc/index.php?topic=203045.msg1496187#msg1496187

  42. vicky sagt:

    hi all.
    I’m having problems with the easyVR commander software. Whenever I’m trying to train a word in any of the groups,passwordI get an error that says “training error: recognition failure” However when I train in the Trigger area it’s fine. Does anyone have experience with this problem or know a work around?

  43. efa sagt:

    Hi!

    I am making a project that can control 16 LEDs by giving command to easyvr.i.e.
    When I say ON1, LED no 1 will light up. The thing is, I want to reduce the number of output pin that is used on the Arduino. I am thinking of using digital shifter (74HC595) but I am not really sure how to do it. Do you have any idea?

    Please correct me if the next statement is wrong. The connection between easyvr and arduino are using Pin 12, 13, 5v and GND on Arduino Uno.

  44. Rodrigo Saraiva sagt:

    My problem is that I put the code and appears me two errors (error : conflicting return type specified for ‘ virtual void SoftwareSerial :: write ( uint8_t ) ‘ and the other ( ‘ virtual size_t Print :: write ( uint8_t ) ‘ overriding what would be the solution to min ?

    this is my code :
    # if defined ( ARDUINO ) && ARDUINO > = 100
    # include ” Arduino.h ”
    # include ” SoftwareSerial.h ”
    SoftwareSerial port ( 12,13 ) ;
    # else / / Arduino 0022 – use modified NewSoftSerial
    # include ” WProgram.h ”
    # include ” NewSoftSerial.h ”
    NewSoftSerial port ( 12,13 ) ;
    # endif

    # include ” EasyVR.h ”
    EasyVR easyvr (port ) ;

    / / Groups and Commands
    enum Groups
    {
    GROUP_0 = 0,
    GROUP_1 = 1,
    GROUP_16 = 16 ,
    } ;

    enum Group0
    {
    G0_UNO = 0,
    } ;

    enum Group1
    {
    G1_ATIVAR = 0,
    G1_PARTIDA = 1,
    G1_LANTERNA = 2
    G1_DESLIGAR_LANTERNA = 3
    G1_FAROIS = 4
    G1_DESLIGAR_FAROIS = 5
    G1_DESATIVAR = 6
    } ;

    enum Group16
    {
    G16_RODRIGO = 0,
    } ;

    EasyVRBridge bridge ;

    int8_t group , idx ;

    void setup ( )
    {
    / / Bridge mode ?
    if ( bridge.check () )
    {
    (CLI );
    bridge.loop (0, 1 , 12, 13);
    }
    / / Normally run
    Serial.begin (9600 );
    port.begin (9600 );

    if ( ! easyvr.detect ( ) )
    {
    Serial.println ( ” EasyVR not detected “);
    for (; ;) ;
    }

    easyvr.setPinOutput ( EasyVR :: IO1 , LOW ) ;
    Serial.println ( ” EasyVR detected ! ” ) ;
    easyvr.setTimeout (5);
    easyvr.setLanguage (0);

    group = EasyVR :: TRIGGER / / = 0 )
    {
    / / Built -in trigger ( ROBOT )
    / / Group = GROUP_X ; = 0 )
    {
    / / Print debug message
    uint8_t train = 0;
    char name [ 32 ] ;
    Serial.print ( ” Command ” ) ;
    Serial.print ( idx ) ;
    if ( easyvr.dumpCommand (group , idx , name , train) )
    {
    Serial.print ( “= “);
    Serial.println (name) ;
    }
    else
    Serial.println ();
    easyvr.playSound ( 0, EasyVR :: VOL_FULL );
    / / Perform some action
    Action ();
    }
    else / / or timeout errors
    {
    if ( easyvr.isTimeout () )
    Serial.println ( ” Timed Out, try again … ” ) ;
    int16_t err = easyvr.getError ( ) ;
    if ( err > = 0 )
    {
    Serial.print ( ” Error ” ) ;
    Serial.println ( err , HEX ) ;
    }
    }
    }

    void action ()
    {
    switch ( group)
    {
    GROUP_0 case :
    switch ( idx )
    {
    G0_UNO case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    }
    break;
    GROUP_1 case :
    switch ( idx )
    {
    G1_ATIVAR case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_PARTIDA case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_LANTERNA case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_DESLIGAR_LANTERNA case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_FAROIS case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_DESLIGAR_FAROIS case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_DESATIVAR case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    }
    break;
    GROUP_16 case :
    switch ( idx )
    {
    G16_RODRIGO case :
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    }
    break;
    }
    }

  45. Rodrigo Saraiva sagt:

    actually this code is here ! !
    # define RELAYA 3
    # define RELAYB 4
    # define RELAYC 5
    # define RELAYD 6
    # define RELAYE 7
    # define RELAYF 8
    # if defined ( ARDUINO ) && ARDUINO > = 100
    # include ” Arduino.h ”
    # include ” SoftwareSerial.h ”
    SoftwareSerial port ( 12,13 ) ;
    # else / / Arduino 0022 – use modified NewSoftSerial
    # include ” WProgram.h ”
    # include ” NewSoftSerial.h ”
    NewSoftSerial port ( 12,13 ) ;
    # endif
    LDR int ;
    int cont ;
    int i;
    # include ” EasyVR.h ”
    EasyVR easyvr (port ) ;

    / / Groups and Commands
    enum Groups
    {
    GROUP_0 = 0,
    GROUP_1 = 1,
    GROUP_16 = 16 ,
    } ;

    enum Group0
    {
    G0_UNO = 0,
    } ;

    enum Group1
    {
    G1_ATIVAR = 0,
    G1_PARTIDA = 1,
    G1_LANTERNA = 2
    G1_DESLIGAR_LANTERNA = 3
    G1_FAROIS = 4
    G1_DESLIGAR_FAROIS = 5
    G1_DESATIVAR = 6
    } ;

    enum Group16
    {
    G16_RODRIGO = 0,
    } ;

    EasyVRBridge bridge ;

    int8_t group , idx ;

    void setup ( )
    {
    pinMode ( RELAYA , OUTPUT ) ;
    pinMode ( RELAYB , OUTPUT ) ;
    pinMode ( RELAYC , OUTPUT ) ;
    pinMode ( RELAYD , OUTPUT ) ;
    pinMode ( RELAYE , OUTPUT ) ;
    pinMode ( RELAYF , OUTPUT ) ;
    / / Bridge mode ?
    if ( bridge.check () )
    {
    (CLI );
    bridge.loop (0, 1 , 12, 13);
    }
    / / Normally run
    Serial.begin (9600 );
    port.begin (9600 );

    if ( ! easyvr.detect ( ) )
    {
    Serial.println ( ” EasyVR not detected “);
    for (; ;) ;
    }

    easyvr.setPinOutput ( EasyVR :: IO1 , LOW ) ;
    Serial.println ( ” EasyVR detected ! ” ) ;
    easyvr.setTimeout (5);
    easyvr.setLanguage (0);

    group = EasyVR :: TRIGGER ;
    easyvr.playSound ( 0, EasyVR :: VOL_FULL );
    group = GROUP_0 / / < – start group ( customize )
    }

    void action () ;

    void loop ( )
    {
    easyvr.setPinOutput ( EasyVR :: IO1 , HIGH ) / / LED on ( listening )

    Serial.print ( " Say a command in Group " ) ;
    Serial.println ( group) ;
    easyvr.recognizeCommand ( group) ;

    of
    {
    LDR = 0;
    for (i = 0, i < = 10, i + +)
    {
    cont = analogRead ( A0 ) ;
    LDR = LDR + cont ;
    delay ( 20 ) ;
    }
    LDR = LDR/10 ;
    Serial.println (LDR );
    ( LDR < = 200 ) ( digitalWrite ( RELAYE , HIGH ) ) : ( digitalWrite ( RELAYE , LOW ) );
    ( LDR = 0 )
    {
    / / Built -in trigger ( ROBOT )
    / / Group = GROUP_X ; = 0 )
    {
    / / Print debug message
    uint8_t train = 0;
    char name [ 32 ] ;
    Serial.print ( ” Command ” ) ;
    Serial.print ( idx ) ;
    if ( easyvr.dumpCommand (group , idx , name , train) )
    {
    Serial.print ( “= “);
    Serial.println (name) ;
    }
    else
    Serial.println ();
    easyvr.playSound ( 0, EasyVR :: VOL_FULL );
    / / Perform some action
    Action ();
    }
    else / / or timeout errors
    {
    if ( easyvr.isTimeout () )
    Serial.println ( ” Timed Out, try again … ” ) ;
    int16_t err = easyvr.getError ( ) ;
    IF ( err > = 0 )
    {
    Serial.print ( ” Error ” ) ;
    Serial.println ( err , HEX ) ;
    }
    }
    }

    void action ()
    {
    switch ( group)
    {
    GROUP_0 case :
    switch ( idx )
    {
    G0_UNO case :
    easyvr.playSound ( 4 EasyVR :: VOL_FULL );
    group = GROUP_16 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    }
    break;
    GROUP_1 case :
    switch ( idx )
    {
    G1_ATIVAR case :
    digitalWrite ( RELAYA , HIGH ) ;
    group = GROUP_1 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_PARTIDA case :
    easyvr.playSound ( 3 EasyVR :: VOL_FULL );
    digitalWrite ( RELAYB , HIGH ) ;
    delay ( 1000) ;
    digitalWrite ( RELAYB , LOW ) ;
    group = GROUP_1 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_LANTERNA case :
    digitalWrite ( RELAYC , HIGH ) ;
    group = GROUP_1 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_DESLIGAR_LANTERNA case :
    digitalWrite ( RELAYC , LOW ) ;
    group = GROUP_1 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_FAROIS case :
    digitalWrite ( RELAYD , HIGH ) ;
    group = GROUP_1 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_DESLIGAR_FAROIS case :
    digitalWrite ( RELAYD , LOW ) ;
    group = GROUP_1 / / write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    G1_DESATIVAR case :
    digitalWrite ( RELAYA , LOW ) ;
    group = GROUP_1 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    }
    break;
    GROUP_16 case :
    switch ( idx )
    {
    G16_RODRIGO case :
    easyvr.playSound ( 1 :: EasyVR VOL_FULL );
    group = GROUP_1 ;
    / / Write your action code here
    / / Group = GROUP_X ; < – or jump to another group X is composite commands
    break;
    }
    break;
    }
    }

  46. waqas sagt:

    hi all.
    I’m having problems with the easyVR commander software. Whenever I’m trying to train a word in any of the groups,passwordI get an error that says “training error: recognition failure” However when I train in the Trigger area it’s fine. Does anyone have experience with this problem or know a work around?

  47. ScoffingCoder sagt:

    Hi all

    I don’t know how to solve this … my Arduino isn’t familiar with this line

    NewSoftSerial port(12,13);

    help please…

    Thanks

Hinterlasse einen Kommentar