   // The WAM's overheating!
   if ((motorDiagA == LOW || motorDiagB == LOW) && doorState != doorError) {
     motorFree();
-    Serial.print(F("Motor driver error condition - door disabled\n"));
+    Serial.print(currentMillis);
+    Serial.print(F(" Motor driver error condition - door disabled\r\n"));
     setLeds1(red, ledFade);
     doorState = doorError;
   }
+
+// remote debugging aid
+// TODO: formalize the commands
+if (Serial.available()) {
+  char c;
+  if ((c = Serial.read()) == 'x') {
+    swTrigger = LOW;
+  } else if (c == 'X') {
+    swTrigger = HIGH;
+  } else if (c == 'b') {
+    swBack = LOW;
+  } else if (c == 'B') {
+    swBack = HIGH;
+  } else if (c == 'f') {
+    swFront = LOW;
+  } else if (c == 'F') {
+    swFront = HIGH;
+  } else if (c == 'r') {
+//    motorEnable();
+    doorState = doorBlocked;
+  } else if (c == 'm') {
+    Serial.println(currentMillis);
+  } else if (c == '\n') {
+    Serial.print(F("\r\n"));
+  }
+}
 
   switch(doorState) {
     case doorClosed:
       // wait until a button is pressed or the front switch opens
       if (swFront == HIGH || swTrigger == LOW) {
+        Serial.print(currentMillis);
         if (swFront == HIGH) {
           // maybe someone tried to pull the door open
           // TODO: or the door slams too fast into the end-stop and rebounds. align profile & inertial reality
-          Serial.print(F("Front switch triggered - opening door\n"));
+          Serial.print(F(" Front switch triggered - opening door\r\n"));
           initDrive(backward, accelProfileLow);
         } else {
-          Serial.print(F("Button switch triggered - opening door\n"));
+          Serial.print(F(" Button switch triggered - opening door\r\n"));
           initDrive(backward, accelProfileHigh);
 // TODO: think again. re-arming swTrigger disables deglitching
 // any short HIGH pulse resets swTrigger to LOW

    case doorBlocked:
      // wait until a button is pressed
      if (swTrigger == LOW) {
        // close door only if end-stop is active
        if (swBack == LOW) {
          Serial.print(F("Button switch triggered - closing door\n"));
          initDrive(forward, accelProfileLow);
          ledMode = ledForward;
          doorState = doorClosing;
        } else {
          Serial.print(F("Button switch triggered - opening door\n"));
          initDrive(backward, accelProfileLow);
          ledMode = ledBackward;
          doorState = doorOpening;

    debounce(switchBack, &swBack, &swBackDebounce);
  }


  // fast debounce driver error signals to filter short glitches
  debounce(motorDiagAPin, &motorDiagA, &motorDiagADebounce);
  debounce(motorDiagBPin, &motorDiagB, &motorDiagBDebounce);
