 //   https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library
 // And you need AccelStepper fork with AFMotor support with library 
 //   https://github.com/adafruit/AccelStepper
+// if using adafruit motor shield v1 then you need v1 library
+//' https://github.com/adafruit/Adafruit-Motor-Shield-library
 // The latest version of AccellStepper should have AFMotor support already.
 // http://www.airspayce.com/mikem/arduino/AccelStepper/
 

#define MICROSTEPS 8

#endif

void setup()
{  


// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myStepper1 = AFMS.getStepper(STEPS_PER_ROTATION, 2);

//motor port #1 M1 and M2
//Adafruit_StepperMotor *myStepper1 = AFMS.getStepper(STEPS_PER_ROTATION, 1);

// you can change these to DOUBLE or INTERLEAVE or MICROSTEP!
void forwardstep1() {
  if (DIRECTION > 0) {  
    myStepper1->onestep(BACKWARD, MICROSTEP);
  } else {
    myStepper1->onestep(BACKWARD, DOUBLE);
  }
}
void backwardstep1() {  
  if (DIRECTION > 0) {  
    myStepper1->onestep(FORWARD, DOUBLE);
  } else {
    myStepper1->onestep(FORWARD, MICROSTEP);
  }
}

AccelStepper Astepper1(forwardstep1, backwardstep1); // use functions to step
