 
 #endif
 
-#if EASYDRIVER == 1
+#if STEPPER_DRIVER == 1
 
 AccelStepper Astepper1(1, 9, 8);
 #define MICROSTEPS 8

// ConstantSpeed.pde
// -*- mode: C++ -*-
//
// If using Motorshield requires the Adafruit_Motorshield v2 library 
//   https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library
// And AccelStepper with AFMotor support 
//   https://github.com/adafruit/AccelStepper

// This tutorial is for Adafruit Motorshield v2 only!
// Will not work with v1 shields

#include <AccelStepper.h>
#include <Wire.h>

#define MOTORSHIELD 0 // Set to 1 if using Adafruit Motorshield
#define EASYDRIVER 1  // Set to 1 if using Easydriver


#if MOTORSHIELD == 1
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"
#endif

//Constants
static const float STEPS_PER_ROTATION = 200.0; // Steps per rotation, just steps not microsteps.
static const float THREADS_PER_INCH = 20;  //Threads per inch or unit of measurement
static const float R_I = 7.28;     // Distance from plate pivot to rod when rod is perp from plate
static const float D_S = 0.00591;   // Distance from rod pivot to plate
static const float D_F = 0.252; // Distiance along rod from plate to starting position
static const float RECALC_INTERVAL_S = 15; //Time in seconds between recalculating

static const int STOP_BUTTON_PIN = 0;  //The pin the stop push switch is on
static const float RESET_SPEED = -1000.0;  //The speed to go back to initial position at


#if MOTORSHIELD == 1
// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
// Or, create it with a different I2C address (say for stacking)

  Serial.println("Star Tracker v0.01");
  
  pinMode(STOP_BUTTON_PIN, INPUT_PULLUP);
#if STEPPER_DRIVER == 0
  AFMS.begin();  // create with the default frequency 1.6KHz
#endif

