Arduino NANO + Devantech CMPS10 compass

Digital 3-axis compass


$CMP,140,-7,0	$ACC,-0.0322,-0.1055,1.0156
$CMP,140,-7,0	$ACC,-0.0156,-0.1084,0.9834
$CMP,140,-7,0	$ACC,-0.0400,-0.1045,0.9834
$CMP,140,-7,0	$ACC,-0.0576,-0.0752,0.9766


I2C protocol5 volts

I wanted the Ardunio to be able to detect the direction it is pointing - thus a compass. It's important to get a Tilt Compensation Compass as otherwise if it's not level you will not get a proper bearing. You also get the advantange of being able to measure pitch and roll.

The Arduino NANO has pins A4(SDA) and pin A5(SCL) connectors.


Copy/Paste Sketch