Arduino Mega code for a self-balancing two-wheeled vehicle or robot