Do you know which way the wind blows? You will now, with this triple-axis accelerometer/magnetometer compass module. Inside are two sensors, one is a classic 3-axis accelerometer, which can tell you which direction is down towards the Earth (by measuring gravity). The other is a magnetometer that can sense where the strongest magnetic force is coming from, generally used to detect magnetic north. By combining this data you can then orient your project!
We based this breakout on the latest version of the popular LSM303 sensor, the LSM303AGR. This compact sensor uses I2C to communicate and its very easy to use. Simply download our library and connect the SCL pin to your I2C clock pin, and SDA pin to your I2C data pin and upload our test program to read out accelerometer and magnetic field data.