Arduino DUE + Devantech CMPS12 compass

Digital 3-axis compass

Photo

I2C protocol3.3 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 DUE has pins 20 and pin 21 for the i2C SDA and SLC connectors.

Fritzing

Image developed using Fritzing

Sketch