If you are the original author, please access your User Control Panel and update it.
I control this robot by using two PID , one for gyro and other encoder measurement 1-one PID for tilt angle to let a robot it standing up 2-second PID for displacement to let robot standing in one position first I tuning a tilte PID second I tuning displacement PID
This is a companion discussion topic for the original entry at https://community.robotshop.com/index.php/robots/show/two-wheeled-inverted-pendulum-balance-robot