EasyVR+Uno Platform.h error

Arduino 1.5.8 IDE
Arduino Uno
EasyVR 2.0 Module

While trying to compile any sketch with the EasyVR library, I keep running into this same fatal error:

Platform.h: no such file or directory
compilation terminated
error compiling

So far I've looked through every Arduino and EasyVR folder for anything related, tried running the basic test sketches and have even tried taking it out of the sketches to see what happens. It still calls for the file. Veear tech support says that this is an issue on the Arduino side of things, not the EasyVR. Anyone out there been here before? Ideas/guess as to what may be going will be gladly accepted.

The obvious question is do you have Platform.h on your PC. You should have in a normal Arduino installation but where is the library expecting to find it ?

UKHeliBob:
The obvious question is do you have Platform.h on your PC. You should have in a normal Arduino installation but where is the library expecting to find it ?

That's where I'm stuck, where should it be and why is it not?

Outside of adding libraries for the EasyVR and an Emic2 TTS module, the IDE is exactly as it was since downloading. I've physically gone through all folders as well as ran a search, no items match.

I had no problems while sketching for my TTS module, would this not have come up then?

On my Windows system Platform.h is in the C:\Program Files\Arduino\arduino-1.0.5\hardware\arduino\cores\arduino folder

What version of the IDE are you using ?

Use IDE 1.5.7, no platform.h found in IDE 1.5.8.

Why are you using the ARM version of the IDE with you AVR device?

If you have both types of boards it's handy.
If I compile my current project for a 3.3V 8MHz Pro mini in the 1.5.7 IDE it's over 5000 bytes smaller than in the 1.0.6 IDE. I'm at 29KB in the 1.0.6 IDE and just under 24KB in the 1.5.7 IDE, I'm happy about that.
Any reason not to?

elac:
Use IDE 1.5.7, no platform.h found in IDE 1.5.8.

That solved it, thanks!

Hello. Sorry if i type in wrong section, but i want ask help from you guys.
I am not kind newbie in Arduino, but i found one problem wich stops me to active my EasyVR on Arduino. I downloaded all libraries and all programs i need, but i have this kind of error.

sketch_nov02b.ino:52:1: error: 'EasyVRBridge' does not name a type
sketch_nov02b.ino: In function 'void setup()':
sketch_nov02b.ino:57:5: error: 'bridge' was not declared in this scope
Error compiling.

Can some one help me?

P.S. Sorry if i multityped in diferent sections.

I downloaded all libraries and all programs i need,

What did you do with them after they were downloaded ?

I installed libraries in 2 ways:

  1. Through Skech → Import library → Add library
  2. Extracted the .zip folder and added to the location where my Arduino programme is and in library folder.

Did you stop/start the IDE after you had installed the libraries ?

By the way, the normal place to install user contributed libraries is in the libraries folder of your default sketches folder rather than the libraries folder of your Arduino installation.

Please post the program that you are trying to compile.

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

int8_t set = 0;
int8_t group = 0;
uint32_t mask = 0;
uint8_t train = 0;
char name[32];
bool useCommands = true;

EasyVRBridge bridge;

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(EasyVR::ENGLISH);

int16_t count = 0;

Serial.print("Sound table: ");
if (easyvr.dumpSoundTable(name, count))
{
Serial.println(name);
Serial.print("Sound entries: ");
Serial.println(count);
}
else
Serial.println(“n/a”);

if (easyvr.getGroupMask(mask))
{
uint32_t msk = mask;
for (group = 0; group <= EasyVR::PASSWORD; ++group, msk >>= 1)
{
if (!(msk & 1)) continue;
if (group == EasyVR::TRIGGER)
Serial.print("Trigger: ");
else if (group == EasyVR::PASSWORD)
Serial.print("Password: “);
else
{
Serial.print(“Group “);
Serial.print(group);
Serial.print(”: “);
}
count = easyvr.getCommandCount(group);
Serial.println(count);
for (int8_t idx = 0; idx < count; ++idx)
{
if (easyvr.dumpCommand(group, idx, name, train))
{
Serial.print(idx);
Serial.print(” = “);
Serial.print(name);
Serial.print(”, Trained “);
Serial.print(train, DEC);
if (!easyvr.isConflict())
Serial.println(” times, OK”);
else
{
int8_t confl = easyvr.getWord();
if (confl >= 0)
Serial.print(” times, Similar to Word “);
else
{
confl = easyvr.getCommand();
Serial.print(” times, Similar to Command ");
}
Serial.println(confl);
}
}
}
}
}
group = 0;
mask |= 1; // force to use trigger
useCommands = (mask != 1);
}

const char* ws0 =
{
“ROBOT”,
};
const char* ws1 =
{
“ACTION”,
“MOVE”,
“TURN”,
“RUN”,
“LOOK”,
“ATTACK”,
“STOP”,
“HELLO”,
};
const char* ws2 =
{
“LEFT”,
“RIGHT”,
“UP”,
“DOWN”,
“FORWARD”,
“BACKWARD”,
};
const char* ws3 =
{
“ZERO”,
“ONE”,
“TWO”,
“THREE”,
“FOUR”,
“FIVE”,
“SIX”,
“SEVEN”,
“EIGHT”,
“NINE”,
“TEN”,
};
const char** ws = { ws0, ws1, ws2, ws3 };

bool checkMonitorInput()
{
if (Serial.available() <= 0)
return false;

// check console commands
int16_t rx = Serial.read();
if (rx == ‘b’)
{
useCommands = false;
set++;
if (set > 3)
set = 0;
}
if (rx == ‘c’)
{
useCommands = true;
do
{
group++;
if (group > EasyVR::PASSWORD)
group = 0;
} while (!((mask >> group) & 1));
}
if (rx == ‘s’)
{
int16_t num = 0;
delay(5);
while ((rx = Serial.read()) >= 0)
{
if (isdigit(rx))
num = num * 10 + (rx - ‘0’);
else
break;
delay(5);
}
if (rx == ‘.’)
{
easyvr.stop();
easyvr.playSound(num, EasyVR::VOL_DOUBLE);
}
}
if (rx >= 0)
{
easyvr.stop();
Serial.flush();
return true;
}
return false;
}

void loop()
{
checkMonitorInput();

easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)
if (useCommands)
{
Serial.print("Say a command in Group ");
Serial.println(group);
easyvr.recognizeCommand(group);
}
else
{
Serial.print("Say a word in Wordset ");
Serial.println(set);
easyvr.recognizeWord(set);
}

do
{
if (checkMonitorInput())
return;
}
while (!easyvr.hasFinished());

easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off

int16_t idx = easyvr.getWord();
if (idx >= 0)
{
Serial.print("Word: “);
Serial.print(easyvr.getWord());
Serial.print(” = ");
if (useCommands)
Serial.println(ws[group][idx]);
else
Serial.println(ws[set][idx]);
// ok, let’s try another set
set++;
if (set > 3)
set = 0;
easyvr.playSound(0, EasyVR::VOL_FULL);
}
else
{
idx = easyvr.getCommand();
if (idx >= 0)
{
Serial.print("Command: “);
Serial.print(easyvr.getCommand());
if (easyvr.dumpCommand(group, idx, name, train))
{
Serial.print(” = ");
Serial.println(name);
}
else
Serial.println();
// ok, let’s try another group
do
{
group++;
if (group > EasyVR::PASSWORD)
group = 0;
} while (!((mask >> group) & 1));
easyvr.playSound(0, EasyVR::VOL_FULL);
}
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);
}
}
}
}

Then i go deeper and i checked the EasyVR library file keywords.txt and there is no command as EasyVRBridge, there is only EasyVR. So i changed the EasyVRBridge bridge; to EasyVR bridge; then it starts to throw me errors as:

sketch_nov02b.ino:52:8: error: no matching function for call to ‘EasyVR::EasyVR()’
sketch_nov02b.ino:52:8: note: candidates are:
In file included from sketch_nov02b.ino:41:0:
C:\Users\MyPC\Documents\Arduino\libraries\EasyVR-Arduino\src/EasyVR.h:323:3: note: EasyVR::EasyVR(Stream&)
EasyVR(Stream& s) : _s(&s), _value(-1), _group(-1), _id(-1)
^
C:\Users\MyPC\Documents\Arduino\libraries\EasyVR-Arduino\src/EasyVR.h:323:3: note: candidate expects 1 argument, 0 provided
C:\Users\MyPC\Documents\Arduino\libraries\EasyVR-Arduino\src/EasyVR.h:75:7: note: EasyVR::EasyVR(const EasyVR&)
class EasyVR
^
C:\Users\MyPC\Documents\Arduino\libraries\EasyVR-Arduino\src/EasyVR.h:75:7: note: candidate expects 1 argument, 0 provided
sketch_nov02b.ino: In function ‘void setup()’:
sketch_nov02b.ino:57:12: error: ‘class EasyVR’ has no member named ‘check’
sketch_nov02b.ino:60:8: error: ‘class EasyVR’ has no member named ‘loop’
Error compiling.

#include "EasyVR.h"

That form of #include expects to find the library file(s) in the same folder as the program file that you are trying to compile.

Try

#include <EasyVR.h>

which will look for the library in a folder named EasyVR in one of the libraries folders.

It is the same:

sketch_nov02b.ino:22:1: error: 'EasyVRBridge' does not name a type
sketch_nov02b.ino: In function 'void setup()':
sketch_nov02b.ino:27:5: error: 'bridge' was not declared in this scope
Error compiling.

I think that the problem should be with the EastVR library maybe not library but the keywords.txt file.

Maybe you have library witch includes keyword such as EasyVRBridge and loop and check and etc. Or someone have been fixing it? Maybe some one will share with it?

I think that the problem should be with the EastVR library maybe not library but the keywords.txt file.

The problem is definitely not the keywords.txt file. All that does is to cause certain keywords to be coloured in the IDE.

Where did you get the library ?

Libraries were downloaded from diferent sources. I was downloading from www.veear.eu, then i was downloading the .zip files from diferent project people were making(there was libraries) and now just a moment ago i read the post that the VEEAR made a big change with theyr library by replacing EasyVRBridge to EasyVR and etc.

https://github.com/RoboTech-srl/EasyVR-Arduino/wiki/Migrate-old-sketches-to-EasyVR-library-version-1.6-and-later

Now i try to run just premade example from library and it have instead of EasyVRBridge it have EasyVR. It runs and compiles good but when i run Serial Monitor it says

Bridge not started!
EasyVR detected, version 1
Sound table: n/a
Custom Grammars: 251
Grammar 4 error
0 = Grammar 5 error
0 = Grammar 6 error
etc....

Now i try to run just premade example from library

Please post the program that you are running.

I FINALY FIXED IT!!!
The problem was that they have created new library and i could find any new examples for it. So by that page i posted before i edited code and maded some other edits and it works!

If some one interested here is the code:

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

#define SND_BEEP  0

uint32_t mask = 0;
int8_t group = 0;
uint8_t train = 0;
char name[32];
boolean onestat = true;
boolean twostat = true;
boolean threestat = true;
boolean fivestat = true;
boolean sixstat = true;




void setup()
{

pinMode(6,OUTPUT);
  digitalWrite(6,LOW);
  pinMode(50, OUTPUT);
  digitalWrite(50, LOW);
  
 // 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;
  }
  
  if (!easyvr.detect())
  {
    Serial.println("EasyVR not detected!");
    for (;;);
  }
  
  easyvr.setPinOutput(EasyVR::IO1, LOW);
  Serial.println("EasyVR detected!");
  easyvr.setTimeout(5);
  easyvr.setLanguage(EasyVR::ENGLISH);
  
  int16_t count = 0;
  
  
  if (easyvr.getGroupMask(mask)) // get trained user names and passwords
  Serial.print("mask= ");
  Serial.println(mask,BIN);
  {
   for (group = 0; group <= EasyVR::PASSWORD; ++group)
    {
      if (group == EasyVR::TRIGGER)
        Serial.print("Trigger: ");
      else if (group == EasyVR::PASSWORD)
        Serial.print("Password: ");
      else
      {
        Serial.print("Group ");
       Serial.print(group);
        Serial.print(": ");
      }
      count = easyvr.getCommandCount(group);
      Serial.println(count);
      for (int8_t idx = 0; idx < count; ++idx)
      {
        if (easyvr.dumpCommand(group, idx, name, train))
        {
          Serial.print(idx);
          Serial.print(" = ");
          Serial.print(name);
          Serial.print(", Trained ");
          Serial.print(train, DEC);
          if (!easyvr.isConflict())
            Serial.println(" Times, OK");
          else
          {
            int8_t confl = easyvr.getWord();
            if (confl >= 0);

            else
            {
              confl = easyvr.getCommand();

            }
            Serial.println(confl);
          }
        }
      }
    }
  }
}

void loop()
{

  begin:
  int idx_cmd;   
 
  
  easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)
  
  Serial.println("Say a command in group two");  
  easyvr.recognizeCommand(2);   // NUSIRODO IS KURIOS GRUPEs PAIMA ZODZIuS
  while (!easyvr.hasFinished());
  
  easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off
 delay(3000);
  idx_cmd = easyvr.getCommand(); 

  if (idx_cmd >= 0) 
  {    
    Serial.print("Name: ");    
    if (easyvr.dumpCommand(1, idx_cmd, name, train))
    {
      Serial.println(name);
     Serial.println(idx_cmd);
    }  
    else
      Serial.println();  
    if (idx_cmd == 0)
  {
    digitalWrite(50, HIGH);
    easyvr.playSound(SND_BEEP  , EasyVR::VOL_FULL);
  }  
  else 
  {
  digitalWrite(50, LOW);
  easyvr.playSound(SND_BEEP  , EasyVR::VOL_FULL);
  }   
    if (idx_cmd == 2){ //kuria grupe paimi turbut ir cia reikia pakeisti
     if(onestat == 0){
  
    onestat = 1;
    Serial.println("Lights turned on!"); 
     easyvr.playSound(SND_BEEP  , EasyVR::VOL_FULL);
    goto begin;
    
     }
      else{
      
       onestat = 0;
       Serial.println("Lights turned off!");
        
       easyvr.playSound(SND_BEEP  , EasyVR::VOL_FULL);


       goto begin;
      }
    }
           
    
  
  else
  {
    if (easyvr.isTimeout()) 
        Serial.println("Timed out... try again!");
      
    int16_t err = easyvr.getError();
    if (err >= 0)
    {
     Serial.print("Error ");
      Serial.println(err, HEX);          
    }
  }
}
}