2021-01-02, 10:50 PM
pitch and roll should both be zero sitting level once you level the sensors
You can plot the raw sensor values using "pypilot_scope_wx" or just dump them to a terminal with something like
"pypilot_client -c imu.compass"
Anyway, you may need to calibrate the accelerometers. about 20-30% of mpu9255 I received need this calibration to be able to work properly. About 10% of mpu9255 I received are defective for various reasons. This is from a total of about 200 sensors.
As for the compass heading changing wildly.. this indicates either the magnetic sensors are defective, or there is a stray magnetic field nearby. Perhaps there is ac power or something? Otherwise you may need a different mpu9255
You can plot the raw sensor values using "pypilot_scope_wx" or just dump them to a terminal with something like
"pypilot_client -c imu.compass"
Anyway, you may need to calibrate the accelerometers. about 20-30% of mpu9255 I received need this calibration to be able to work properly. About 10% of mpu9255 I received are defective for various reasons. This is from a total of about 200 sensors.
As for the compass heading changing wildly.. this indicates either the magnetic sensors are defective, or there is a stray magnetic field nearby. Perhaps there is ac power or something? Otherwise you may need a different mpu9255