Arduino Forum

Topics => Robotics => Topic started by: Marcos122122 on Oct 10, 2015, 05:55 pm

Title: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 10, 2015, 05:55 pm
Hello. I need help for a project I 'm doing with vr and Arduino easy . When compiling the code and open the serial monitor I get: "easy vr is not detected "
Help take a lot of time researching but can not find the answer.
Thank's
(I'm using Google Translate)
Code: [Select]

#include "Arduino.h"
#if !defined(SERIAL_PORT_MONITOR)
  #error "Arduino version not supported. Please update your IDE to the latest version."
#endif

#if defined(SERIAL_PORT_USBVIRTUAL)
  // Shield Jumper on HW (for Leonardo and Due)
  #define port SERIAL_PORT_HARDWARE
  #define pcSerial SERIAL_PORT_USBVIRTUAL
#else
  // Shield Jumper on SW (using pins 12/13 or 8/9 as RX/TX)
  #include "SoftwareSerial.h"
  SoftwareSerial port(12, 13);
  #define pcSerial SERIAL_PORT_MONITOR
#endif

#include "EasyVR.h"

EasyVR easyvr(port);

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

enum Group1
{
  G1_ENCENDER_LAMPARA = 0,
  G1_APAMAR_LAMPARA = 1,
};

enum Group16
{
  G16_INDAHAUS = 0,
};


int8_t group, idx;

void setup()
{
  // setup PC serial port
  pcSerial.begin(9600);

  // bridge mode?
  int mode = easyvr.bridgeRequested(pcSerial);
  switch (mode)
  {
  case EasyVR::BRIDGE_NONE:
    // setup EasyVR serial port
    port.begin(9600);
    // run normally
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge not started!"));
    break;
    
  case EasyVR::BRIDGE_NORMAL:
    // setup EasyVR serial port (low speed)
    port.begin(9600);
    // soft-connect the two serial ports (PC and EasyVR)
    easyvr.bridgeLoop(pcSerial);
    // resume normally if aborted
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge connection aborted!"));
    break;
    
  case EasyVR::BRIDGE_BOOT:
    // setup EasyVR serial port (high speed)
    port.begin(115200);
    // soft-connect the two serial ports (PC and EasyVR)
    easyvr.bridgeLoop(pcSerial);
    // resume normally if aborted
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge connection aborted!"));
    break;
  }

  while (!easyvr.detect())
  {
    Serial.println("EasyVR not detected!");
    delay(1000);
  }

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

  group = EasyVR::TRIGGER; //<-- 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);

  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);
    }
  }
}

void action()
{
    switch (group)
    {
    case GROUP_1:
      switch (idx)
      {
      case G1_ENCENDER_LAMPARA:
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      case G1_APAMAR_LAMPARA:
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      }
      break;
    case GROUP_16:
      switch (idx)
      {
      case G16_INDAHAUS:
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      }
      break;
    }
}


If you do not see the code , it is this:
#include "Arduino.h"
#if !defined(SERIAL_PORT_MONITOR)
  #error "Arduino version not supported. Please update your IDE to the latest version."
#endif

#if defined(SERIAL_PORT_USBVIRTUAL)
  // Shield Jumper on HW (for Leonardo and Due)
  #define port SERIAL_PORT_HARDWARE
  #define pcSerial SERIAL_PORT_USBVIRTUAL
#else
  // Shield Jumper on SW (using pins 12/13 or 8/9 as RX/TX)
  #include "SoftwareSerial.h"
  SoftwareSerial port(12, 13);
  #define pcSerial SERIAL_PORT_MONITOR
#endif

#include "EasyVR.h"

EasyVR easyvr(port);

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

enum Group1
{
  G1_ENCENDER_LAMPARA = 0,
  G1_APAMAR_LAMPARA = 1,
};

enum Group16
{
  G16_INDAHAUS = 0,
};


int8_t group, idx;

void setup()
{
  // setup PC serial port
  pcSerial.begin(9600);

  // bridge mode?
  int mode = easyvr.bridgeRequested(pcSerial);
  switch (mode)
  {
  case EasyVR::BRIDGE_NONE:
    // setup EasyVR serial port
    port.begin(9600);
    // run normally
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge not started!"));
    break;
   
  case EasyVR::BRIDGE_NORMAL:
    // setup EasyVR serial port (low speed)
    port.begin(9600);
    // soft-connect the two serial ports (PC and EasyVR)
    easyvr.bridgeLoop(pcSerial);
    // resume normally if aborted
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge connection aborted!"));
    break;
   
  case EasyVR::BRIDGE_BOOT:
    // setup EasyVR serial port (high speed)
    port.begin(115200);
    // soft-connect the two serial ports (PC and EasyVR)
    easyvr.bridgeLoop(pcSerial);
    // resume normally if aborted
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge connection aborted!"));
    break;
  }

  while (!easyvr.detect())
  {
    Serial.println("EasyVR not detected!");
    delay(1000);
  }

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

  group = EasyVR::TRIGGER; //<-- 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);

  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);
    }
  }
}

void action()
{
    switch (group)
    {
    case GROUP_1:
      switch (idx)
      {
      case G1_ENCENDER_LAMPARA:
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      case G1_APAMAR_LAMPARA:
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      }
      break;
    case GROUP_16:
      switch (idx)
      {
      case G16_INDAHAUS:
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      }
      break;
    }
}
Title: Re: Easy VR Shield 3 HELP
Post by: PaulS on Oct 10, 2015, 07:54 pm
Quote
I need help for a project I 'm doing with vr and Arduino easy .
Which Arduino? How IS the VR connected?

Title: Re: Easy VR Shield 3 HELP
Post by: Marcos122122 on Oct 14, 2015, 06:57 pm
 i'm using Arduino Leonardo and connect with the Quick USB cable.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 16, 2015, 07:28 pm
Help please!
Title: Re: Easy VR Shield 3 HELP!
Post by: PaulS on Oct 17, 2015, 02:47 pm
I don't see a link to the VR module you are using.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 17, 2015, 05:04 pm
use the bridge on SW in the Easy VR sheield.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 20, 2015, 02:17 pm
HELP!
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 25, 2015, 09:47 am
The Program EasyVR Commander has a drop down box where you need to select the com port. Make sure the correct port is selected.

It looks like the EasyVR shield includes some jumpers. Have you set these for the Leonardo? A picture of your setup might help us find a problem.

It's possible to communicate with EasyVR without an Arduino if you have a serial to USB adapter. Do you have a serial to USB adapter to use as an alternative to the Arduino?

Do you have any other Arduino boards?
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 27, 2015, 03:44 pm
I have a Quick USB cable but, i don't have another arduino board.
I upload a photo un 2 hours.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 27, 2015, 07:03 pm
Easy VR + Arduino Leonardo:
(https://gyazo.com/edfffc3222f6ccf5c2968604a9ea2a10)
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 27, 2015, 07:21 pm
https://gyazo.com/edfffc3222f6ccf5c2968604a9ea2a10
Title: Re: Easy VR Shield 3 HELP!
Post by: PaulS on Oct 27, 2015, 07:51 pm
I'll write up a response on a wet paper towel, and post a fuzzy, poorly lit, picture of that. When I get around to it.
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 27, 2015, 08:25 pm
It looks like for the Leonardo you need to follow the directions on the bottom half of page 22 of the user manual. This is a link to the pdf. (http://www.veear.eu/files/EasyVR%203%20User%20Manual%201.0.11.pdf)

I believe you have the jumper in the wrong position. According to page 22 you should use the "HW" position.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 27, 2015, 09:36 pm
I've already done but nothing , I get into the serial port but it say if easyVR is not detected.
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 28, 2015, 01:04 am
Did you try the "Test Shield with Arduino" section on page 22? Did you send a question mark? What did the terminal window display?
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 28, 2015, 01:48 pm
I have proven the test EasyVr but does not work, in the serial monitor say: Bridge not started, then: EasyVR not detected.
But sometimes I get only EasyVR not started.
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 28, 2015, 05:32 pm
Based on the photo you provided, I think it's safe to assume you soldered the headers onto the EasyVR module yourself right?

I think you need to redo the solder joints. Watch some YouTube videos on the topic. I believe Adafruit has a soldering tutorial which is pretty good.

I don't think the EasyVR is making all the connections with the shield it needs to in order to communicate with the Arduino.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 28, 2015, 05:48 pm
I took it to a shop for me welded with tin.
Other photo:
https://gyazo.com/45efde3655b990b990bc3b70defcf3b0
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 28, 2015, 06:03 pm
I can't see the solder joints in those pictures.

Here's a picture of some soldered joints. The one marked with a red "X" is not very good.

(http://forums.parallax.com/attachment.php?attachmentid=109847&d=1406471716)

Only the ones with a green check mark are good solder joints.

The other joints are probably working okay but ideally the solder should look like the ones with green check marks.

It would help if you could take a similar picture of the joints on your board. You need to use a lot of light in order to get a good photo.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 28, 2015, 06:45 pm
Two photos:
https://gyazo.com/c7b15c11fdd854a0d0ac6f8a58c8a940
https://gyazo.com/5462ede4100e92015c2143f87c3dc9c1
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 28, 2015, 07:42 pm
The soldering doesn't look good but I'm surprised it's not good enough to work. A couple of those solder joints just look like drops of solder.

I'm not sure it's your problem, but that soldering looks bad enough that I think it's worth having it redone.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 28, 2015, 08:42 pm
but the board if it works because i can open EasyVR Commander and I put audio.
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 28, 2015, 09:12 pm
Hi Marcos, I think we may be having a language problem.

but the board if it works because i can open EasyVR Commander and I put audio.
I don't understand what you mean by the sentence quoted above.

How do you "put audio" into the EasyVR? Is this the "Update Sound Table" under "Tools"?

I'm not sure if your version of EasyVR Commander uses the same words as my English version does but the "Update Sound Table" is available when the EasyVR is not connected. I don't know if we are talking about the same thing or not.
Title: Re: Easy VR Shield 3 HELP!
Post by: Marcos122122 on Oct 29, 2015, 02:48 pm
No, i meant that my EasyVR board works in EasyVR Commander program.
Title: Re: Easy VR Shield 3 HELP!
Post by: DuaneDegn on Oct 29, 2015, 04:42 pm
No, i meant that my EasyVR board works in EasyVR Commander program.
Then it seems like the problem is with the EasyVR to Arduino connections. Figure out which pins are used when the Arduino and the EasyVR try to communicate and redo the soldering on those pins.

If you paid someone to do that soldering job, you paid too much. That soldering is awful. Awful looking soldering sometimes works but it's pretty clear something isn't working for you and it sure seems like the soldering job is a likely cause of the trouble.
Title: Re: Easy VR Shield 3 HELP!
Post by: dmorenoar on Mar 19, 2016, 08:21 pm
Hi,

I'm using EasvyVR3 over ethernet shield, separately easy and ethernet works fine, but when I try to put easy over ethernet doesn't work. I think that something is wrong with the ports, because maybe ethernet and easy uses the port 12 and 13, how I can change the easyVR ports?? Excuse my ignorance..but I'm newie :(



Thanks.

Best regards