Friday 12 February 2016

The code

The PIC microprocessor, programmed with the PICAXE system is fairly straight forward and is used to produce the desired behavior of the servos mentioned in the previous section.


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