Basic Control of a R/C Servo

Servo servo image

This program is just a very simple example that uses the Procyon Library to use the Mega 32 board to control a servo. It will rotate the arm one way, then stop and then back again, and then repeats.

Note: The servo has three wires from it. Connect the Black (or Brown) to GND (or Negative - of the battery pack). Connect the Red wire to Vss + (I used 5V but they run up to about 7 Volts I think, see the manufacturer's datasheet). The last wire, usually Orange or a similar colour is the signal wire and needs to be connected to the first pin (Pin0) of Port B. This can be changed in code if you want, just see the comments in the code itself.

If you have any questions etc, drop by the FORUM

Website subject to copyright. No unauthorised distribution.