Code and schematic for building a precise tilt compensated compass using QMC5883 and MPU6050 (or a MPU9050 knockoff with no magnetometer). Works nicely on ESP32, should work on Arduino as well. It has ...