PID control loop for balancing robot