Subroutines are used for the 3 types of movement needed - forward, turn clockwise 180° and turn counter-clockwise 180°.
The above will make the robot do this:
...forever.
Note the pause values, the forward movement is arbitrary, but the pause values after the turn is initiated is crucial to making the correct number of degrees.
No comments:
Post a Comment