This page shows two examples on how to drive a unipolar stepper motor. These motors can be found in old floppy drives and are easy to control. The one we use has 6 connectors of which one is power (VCC) and the other four are used to drive the motor sending synchronous signals.
The first example is the basic code to make the motor spin in one direction. It is aiming those that have no knowledge in how to control stepper motors. The second example is coded in a more complex way, but allows to make the motor spin at different speeds, in both directions, and controlling both from a potentiometer.
Become the Maker you were born to be. Try Arduino Academy for FREE!
The prototyping board has been populated with a 10K potentiomenter that we connect to an analog input, and a ULN2003A driver. This chip has a bunch of transistors embedded in a single housing. It allows the connection of devices and components that need much higher current than the ones that the ATMEGA8 from our Arduino board can offer.
See http://www.arduino.cc/en/Tutorial/StepperUnipolar for more info.
Stepper motor source – http://www.anaheimautomation.com/products/stepper/stepper-motors.php?tID=78&pt=t&cID=19