I’ve seen the ambiguous problem before. Generally it is caused by passing a constant to a function that does different things based on the argument’s type. wire.write(0), for example. It doesn’t know if it should send 1 or 2 bytes. So, the call should be written wire.write((byte)0) or wire.write((int) 0), depending if you meant to send 1 or 2 bytes. Frankly, it should just be a warning and default to byte (which is probably 90% of the usage) but that would be too friendly (or maybe too hard).
I saw this when I upgraded to 1.0 of the Arduino IDE. Also, in the 1.0 upgrade they changed some library function names (wire.send became wire.write, for example). Pretty annoying, frankly.
I really don’t understand why the arduino folks made such significant changes for 1.0. It breaks many, many sketches out there. The wire library error at least tells you what you need to change but the ambiguous parameter thing is a head scratcher. For me, it’s not a problem because I have pretty deep knowledge of software and micros so I can track down just about any bug but for beginners, this has to be a big problem.
At least, they could have warned people. I got the message to upgrade so I did and, bam!, all sorts of stuff stopped working. Yeah, I know it’s free but that doesn’t absolve them.
I have some huge drift on the Yaw axis, is it because I compile for the 1.0 version of the board, are there differences in the number of sensors used between the versions?
If i lay down the board on a flat surface it drifts several degrees before settling down (It never stops completely to drift)
Thanks for the fix btw…
edit: I made a little video from my first attempt on using this I have a low pass filter but for some reason I get lots of jitter, It could be software related on the PC side though…
@Philba you may want to subscribe to the Arduino developers mailing list… all the changes to the APIs and core libraries are discussed there… maybe you can help.
@SparkfunSweden I would suggest to use the Processing sketches available in the FreeIMU library to check the correctness of your setup. Once that checks out you’ll have to sort out the problems in your 3d application. It looks to me that you have to much sensitivity, I mean in the video you only rotate the board about 15 deg and in the app you get a 90 deg rotation… I would have expected to see a 1:1 correspondence.
It was a softwareproblem on the PC side, I read the values from the com port and wrote the values to the shared memory that the game reads in the same thread, if i moved the reading from com to a seperate thread it worked!
fax8: @SparkfunSweden I would suggest to use the Processing sketches available in the FreeIMU library to check the correctness of your setup. Once that checks out you’ll have to sort out the problems in your 3d application. It looks to me that you have to much sensitivity, I mean in the video you only rotate the board about 15 deg and in the app you get a 90 deg rotation… I would have expected to see a 1:1 correspondence.
Processing sketches ? Under File/Examples/FreeImu i found four examples
Quaternion
raw
speedtest
yaw_pitch_roll
But no Processing sketches?
I get strange readings on all 3 axis when running the yaw_pitch_roll example… thanks for all your help!
Please check my little youtube clip, I move the device two times during the video, you can easily identify them, please watch the huge amount of drift each time i move it.
This is done compiling FreeImu using the FreeIMU v0.1 constant in the FreeImu.h
you still may have some problem on your sensors axis in the software. The FreeIMU library expect them to be all aligned for all the sensors as in my FreeIMU boards. Check with the sensors’ datasheets and phisical placement in the board the correct alignment. Future versions of the FreeIMU library will support Sparkfun’s boards (yes, I’m shooting in my foots, but you know…).