// Step 20 steps back and forth

// Demonstrates hot to use a Stepper motor.
// The motor moves 20 stepes back and forth

// Created 30 December 2007

#include <Stepper.h>

// change the steps variable to the number of steps on your motor
int steps = 100; 

// create and attaches a stepper motor
// with 100 steps to pins 0, 1, 2 and 3 

Stepper stepper(steps, 0, 1, 2, 3);


void setup()
{
  // set the speed of the motor to 20 rpms 
  stepper.setSpeed(20);
}

void loop()
{
  // move 20 steps forward 
  stepper.step(20);

  // move 20 steps backwards
  stepper.step(-20);
}
