3D attitude visualizer with Adafruit 9-DOF board + Arduino UNO written in C++.
Sensors:
LSM303DLHC 3-axis accelerometer+magnetometer
L3GD20H 3-axis gyroscope
Sensor fusion algorithm:
https://diydrones.com/forum/topics/simple-imu-my-quaternion-based-complimentary-filter