Code For Auto Stabilizing Arm

The guy used info from this topic Guide to gyro and accelerometer with Arduino including Kalman filtering - Sensors - Arduino Forum in designing the project.