Teensy 3.6 + CMPS12 compass

This is a good tilt compensation compass.

Output


$CMP,35,0,20 degree,	$ACC,-3.3700,0.1000,9.1600 m/s^2,	$GYR,-0.1875,0.1250,-0.0625 degree/s	$TEMP,33	$OK,111111
$CMP,35,0,20 degree,	$ACC,-3.3700,0.0900,9.1700 m/s^2,	$GYR,-0.1250,-0.0625,-0.1250 degree/s	$TEMP,33	$OK,111111
$CMP,35,0,20 degree,	$ACC,-3.3600,0.0900,9.1200 m/s^2,	$GYR,-0.0625,-0.0625,0.0000 degree/s	$TEMP,33	$OK,111111
$CMP,35,0,20 degree,	$ACC,-3.3600,0.0900,9.1600 m/s^2,	$GYR,-0.1250,0.1250,0.0625 degree/s	$TEMP,33	$OK,111111

Photo

Using 1.8k ohms resistors

I2C protocol3.3 volts

Fritzing

Image developed using Fritzing

copy/paste Sketch