Version check is giving me
MOHVEE’s firmware is version 1.1
MOHVEE’s Arduino library is version 1.12
MOHVEE’s hardware is version 1.0
but MOVIshield.h here C:\Users\Steve\Documents\arduino\libraries\MOVI has
#ifndef API_VERSION
#define API_VERSION 1.13f
#endif
Is there some caching going on? or is there another place that MOVIshield.h exists?
I am pretty sure you are loading your MOVIShield.h from another place. I would search your entire directory tree for MOVIShield.h
Gerald
I am sure I have only one version of MOVIshield.h on my system. I have a screen dump that shows only one file with that name. I also re-named that file and tried recompiling and that threw an error, file not found.
Also deleted the tmp/ arduino files and recompiled.
This is very weird.
I have this code in my init
Serial.println("MOHVEE’s firmware is version "+float2string(recognizer.getFirmwareVersion(),1));
Serial.println(“MOHVEE’s Arduino library is version “+float2string(recognizer.getAPIVersion(),2));
Serial.println(“MOHVEE’s hardware is version “+float2string(recognizer.getHardwareVersion(),1));
}
// Helper function that works across Arduino platforms that converts float to String
String float2string(float f, int places)
{
int beforepoint=(int) f;
int afterpoint=(f-beforepoint)*pow(10,places);
return String(beforepoint)+”.”+String(afterpoint);
}
String sjo(float f, int places)
{
int beforepoint=(int) f;
int afterpoint=(f-beforepoint)*pow(10,places);
return String(beforepoint)+”.”+String(afterpoint);
}
This produces
MOHVEE’s firmware is version 1.1
MOHVEE’s Arduino library is version 1.12 ////////// wrong api version
MOHVEE’s hardware is version 1.0
When I change the code as follows
Serial.println("MOHVEE’s firmware is version "+float2string(recognizer.getFirmwareVersion(),1));
Serial.println("MOHVEE’s Arduino library is version "+sjo(recognizer.getAPIVersion(),2)); ///////////////////// Changed here
Serial.println("MOHVEE’s hardware is version "+float2string(recognizer.getHardwareVersion(),1));
}
This is produced
MOHVEE’s firmware is version 1.1
MOHVEE’s Arduino library is version 1.13 ///////// correct api version!
MOHVEE’s hardware is version 1.0
Wow. You just found a rounding bug in float2string!
I googled it and found this:
http://forum.arduino.cc/index.php/topic,37391.0.html
It seems we are dicouraged from using this function.
Gerald