Arduino Mega 2560
This is a super simple Arduino program that centers a single servo. Use it to center each of the servos before you start building ROFI. This will make servo calibration much easier once the robot is finished. Note that you won't need an external power supply for this program, the USB connection will supply enough power for the board and the servo. Make sure to unplug the USB cable before you change servos, so you don't accidentally short the servo connection pins together.
Connect the servo to center as follows:
black wire : GND pin
red wire : Vin pin
orange wire : digital pin 8
- Setup the Arduino development environment on your computer.
- Download the source file for this program.
- Open the Arduino development environment application on your computer.
- Open the source for this program ( from the main menu : File/Open...).
- Wire up the servo to center.
- Plug the Arduino Mega board into your computer with a USB cable