My first attempt at using and Arduino and a mpu-6050 IMU to create a 2 wheeled balancing robot. The software includes my custom DCMotorPair class and MPU-6050 Class for the Arduino environment.
You can read more at
http://bayesianadventures.wordpress.com/2013/10/27/balance-good-everything-good/
download the source code here:
https://github.com/vu2aeo/Arduino/tree/master/BalanceBot2_PID_Control