This object uses an ADC to take readings from a 5DOF Accelerometer/Gyro unit and send them through a Kalman filter. This filter maintains an accurate angle, gyro rate and gyro bias based on the noisy readings. Hook up the MCP3208 ADC to the 5DOF circuit like the object shows. Then start up the filter. After that use the reading for balancing a robot or flying an aircraft.
update: Fixed a few bugs and set the correct stackspace (with a little extra)
update: Added 2 axis. You now use these functions: get_angle_pitch, get_angle_roll, get_rate_pitch, get_rate_roll, get_q_bias_pitch, get_q_bias_roll