IMU Magnetometer values all zero

Hi @feepyj,

You need the formulas for a “tilt compensated compass”.

These links will get you started.

https://cache.freescale.com/files/sensors/doc/app_note/AN4248.pdf

http://www.st.com/content/ccc/resource/technical/document/application_note/e6/f0/fa/af/94/5e/43/de/CD00269797.pdf/files/CD00269797.pdf/jcr:content/translations/en.CD00269797.pdf

The tilt compensated compass only works while Reach is static. If you what the orientation of Reach while dynamic then you will need to use one of the more complicated sensor fusion libraries like this one (GitHub - micropython-IMU/micropython-fusion: Sensor fusion calculating yaw, pitch and roll from the outputs of motion tracking devices).