Hi all,
In using an Arduino Uno to interface with the 9DoF Razor IMU M0 over the I2C bus, I’m finding that occasionally I get erroneous readings from the gyro. When the gyro is stationary, an excerpt from the Arduino serial monitor is as follows:
Pitch: -1.06 Roll: -1.47 Yaw: 0.23
Pitch: -1.09 Roll: -1.40 Yaw: 0.22
Pitch: -123.51 Roll: -46.56 Yaw: -156.27
Pitch: -1.11 Roll: -1.45 Yaw: 0.17
Pitch: -0.98 Roll: -1.47 Yaw: 0.20
Pitch: -1.14 Roll: -1.46 Yaw: 0.19
Pitch: -1.14 Roll: -1.44 Yaw: 0.17
Pitch: -1.11 Roll: -1.40 Yaw: 0.18
Pitch: -123.51 Roll: -46.56 Yaw: -156.27
Pitch: -1.05 Roll: -1.40 Yaw: 0.21
Pitch: -1.06 Roll: -1.37 Yaw: 0.23
You can see that occasionally a grossly incorrect reading of “Pitch: -123.51 Roll: -46.56 Yaw: -156.27” is provided.
I’ve also tried printing out the contents of the WHOAMI register, and occasionally get a value of 192 (decimal) rather than the correct value.
I’ve soldered female headers to the I2C ‘pins’ on the IMU, and have the SDA and SCL pins connected via jumpers to the pins on the Uno labelled SDA and SCL (along with Vcc and Gnd connections).
I’ll put the full Arduino code listing to read the contents of the gyro register in the next post since I don’t seem to have enough room here . Can I please trouble someone who has the IMU and a Uno to try this code and let me know how it goes? That was I can hopefully determine whether it is an issue with the IMU, or something to do with my setup, e.g. grounding, etc.
Or if anyone has any suggestions for resolving this I would be incredibly grateful.