 
 // physical:
 const float WHEEL_RADIUS = (2.0 + 0.125) * 2.54; // 2 inch wheel + 1/8" grommet, in cm
-
+const float MAX_POSITION = 51.0; // in cm
 
 
 

  Timer1.start();
  
  Timer1.attachInterrupt(countSteps);
}

void loop() {

  }
  if (cps < 0) {
    cps = -cps;
    dir = 0;
  } else {
    dir = 1;
  }    
  
  digitalWrite(DIRPIN, dir);
  
  period = 1000000.0 / cps / STEPS_PER_CM;
  // try to get duty period to be about 50 us
  unsigned long duty = (1024.0 * 50.0) / period;
