         }
       }
       // hold the door open if button pressed
-      // TODO: another possibility would be to fall-through to doorBlocked
-      // and close the door instead. which way is better?
       if (swTrigger == LOW) {
         motorFree();
         debug(currentMillis, F("Button switch triggered - door blocked\r\n"));

        if (newPWM != fanPWM) {
          fanPWM = newPWM;
          debug(currentMillis, F("Fan PWM: "));
          Serial.println(fanPWM);
        }
      } else if (fanPWM > 0) {
        fanPWM = fanMin;

  //  attachInterrupt(switchTriggerIRQ, switchTriggerInterrupt, FALLING);

  digitalWrite(statusLED, LOW);

  // reset device if loop() takes too long
  wdt_enable(WDTO_120MS);
}


void loop() {
  unsigned long currentMillis;
  unsigned long elapsedMillis;

  wdt_reset();

  currentMillis = millis();
  // millis() will overflow after approximately 50 days.
