     test("");
 }
 
-void logger(String msg, int timeMillis=0) {
+void logger(String msg, unsigned long timeMillis=0) {
     if (timeMillis == 0) {
         timeMillis = millis();
     }

static volatile bool limitSwitchCloseActive = false;
static volatile int encoderState = 0;
static volatile int encoderPosition = 0;
static volatile int moveStartTime = 0;

static void emergencyStopISR();
static void limitSwitchCloseISR();

}

void timerTick() {
    unsigned long t = millis();
    if (t - moveStartTime > MAX_MOVE_DURATION) {
        motorShield.setM1Speed(0);
        motorShield.setM2Speed(0);
