Use variable in stepper declaration

This commit is contained in:
Matt McWilliams 2022-11-11 15:47:58 -05:00
parent 3942cd05be
commit dec96ec9be
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ const int serialDelay = 5;
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); Adafruit_MotorShield AFMS = Adafruit_MotorShield();
//Set up for a 200step motor (NEMA 17) //Set up for a 200step motor (NEMA 17)
Adafruit_StepperMotor *stepper = AFMS.getStepper(200, 2); Adafruit_StepperMotor *stepper = AFMS.getStepper(stepsPerRevolution, 2);
void setupMotor () { void setupMotor () {
//TWBR = ((F_CPU /400000l) - 16) / 2; // Change the i2c clock to 400KHz //TWBR = ((F_CPU /400000l) - 16) / 2; // Change the i2c clock to 400KHz