 long clockwise = 1;
 
 void loop() {
-//  stepper.update(millis());
   long timestamp = millis();
   
   stepper.update(timestamp);
 
   if (timestamp - lastTimestamp >= period) {
-    stepper.start(1000, 120 * clockwise, timestamp);
+    stepper.start(1000, 60 * STEPPER_MODE * clockwise, timestamp); // 3 revolutions
     clockwise *= -1;
     lastTimestamp = timestamp;
   }

  stepper.zero(50);
  delay(1000);
  digitalWrite(LED_PIN, LOW);

//  stepper.start(100, 30, millis());
}

long period = 4000;

#define stepsPerRevolution 20    // steps per revolution (limited to 315°)
#define LED_PIN 13

//const StepperMode STEPPER_MODE = FULL_STEP;
//const StepperMode STEPPER_MODE = HALF_STEP;
const StepperMode STEPPER_MODE = QUARTER_STEP;

SmoothStepper stepper(stepsPerRevolution, STEPPER_MODE, 2, 3, 4, 5);

void setup() {
  Serial.begin(9600);
