If you read the docs that Al suggested you'll note that it also includes information on how to set the robot into autonomous mode. I suggest a momentary switch for the auto mode. That way you have to press and hold the button down for auto mode to run. If anything goes wrong (and it usually does with software

) then you let go of the button and the robot stops.