Balancing robot - Tuning

The code fragment you posted is completely useless. Edit your post to include the entire code, posted using code tags.