     targetSpeed = 0;
   }
 
-  int newDelayBetweenMotorUpdates = ReadPotentiometer(rateOfSpeedChangeInPin);
+  int newDelayBetweenMotorUpdates = analogRead(rateOfSpeedChangeInPin);
   newDelayBetweenMotorUpdates = map(newDelayBetweenMotorUpdates, 0, potentiometerCeiling, minimumDelay, maximumDelay);
   int absoluteCurrentSpeed = abs(currentSpeed);
   if (absoluteCurrentSpeed > abs(targetSpeed) && absoluteCurrentSpeed < startOfStopDamping)

const int serialPin = 1;
const int clockResetInPin = 14;
const int debugDisplayInPin = 15;

// Settings and limits
const int switchDebounceTime = 30;
const int minimumDelay = 10;
const int maximumDelay = 46;
const int minimumSpeed = 26;

  pinMode(speedOutPin, OUTPUT);
  pinMode(clockResetInPin, INPUT_PULLUP);
  pinMode(debugDisplayInPin, INPUT_PULLUP);
  pinMode(exp1Pin, OUTPUT);
  // We don't have to set pin mode for analog inputs
  
  onOffSwitch.attach(onOffSwitchInPin);
