I observed strange behavoir of the Serial Monitor output with an MPU9250, connected to an Uno via I2C @ 115200 baud.
I use the the IMU Library of richard tech (RTIMUlib): RTIMULib-Arduino, there is also a I2C lib included
For proper usage of the MPU9250 it requires a calibration of the magnetometer, also described here.
The first time I tried the calibration, the Serial Monitor continuously streamed data from the magnetometer sensor. But unfortunately only x and y values, although according to the code also the z-vaules should be printed out. I also got these set of warnings:
"warning Arduino IDE v1.0.1+ with I2CDEV BUILTIN FASTWIRE implementation is recommended." "warning Using current Arduino IDE with Wire library is functionally limiting."
Therefore I replaced the I2C library by another one:
, and the error message was gone.
Now, with the new library there are no magnetometer measurement data displayed at all. Just this:
ArduinoMagCal starting Enter s to save current data to EEPROM ArduinoIMU calibrating device MPU-9250
Thats it. With the first i2c-library I also got something like "successfully initialized". The strange thing is, after I reinstalled the first i2c-lib again, that also doenst work anymore. I get the same serial monitor output plus the warning messages.
I also tried lowering the baud rate to 9600/4800, that doesnt work.
What the heck is going on. Should I try it with a Nano?
Sometimes I get double messages like this:
"ArduinoMagCal starting Enter s to save currenArduinoMagCal starting Enter s to save current data to EEPROM ArduinoIMU calibrating device MPU-9250 "