Books

Notes and explanations

Servos come in handy. Whereas motors are more difficult to control, and, with the exception of stepper motors have a nasty way of spinning up to speed and down to a stop, servos go both directions with excellent control. They also commonly come in at 5V. This is a simple sketch controlling a servo. It's simple to wire - there is a power(runs to 5V pin), ground (ground) and signal. This makes it easier to power using outside sources (make certain ground is to power source).

Stepper motors are another nice option and can be controlled with a high degree of accuracy. There are two types of stepper motors, both of which can be controlled both forwards and backwards. Both need specific circuits to run. Unipolar steppers need a U2004 Darlington Array, and bipolars need a SN75410HE H-Bridge. We don't have the parts here to make these but there is a very good article about them at Tom Igoe's page on stepper motors. The arduino site has code and more information at http://arduino.cc/en/Tutorial/MotorKnob.

Parts & Symbols

Sevo

Copy & Paste the following code to the Arduino IDE.

// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created