 unsigned long ledMoveInterval; // shift LED window every X ms - varied by drivePWM
 unsigned long ledMillis = 0;
 
-bool swFront, swBack, swTrigger, motorDiagA, motorDiagB; // debounced inputs
-bool swFrontDeglitch, swBackDeglitch, swTriggerDeglitch, motorDiagADeglitch, motorDiagBDeglitch; // TODO: quick hack. document
-uint16_t swFrontDebounce, swBackDebounce, swTriggerDebounce, motorDiagADebounce, motorDiagBDebounce; // debounce shift registers
+bool swFront, swBack, swTrigger, motorDiagA, motorDiagB, pirTrigger; // debounced inputs
+bool swFrontDeglitch, swBackDeglitch, swTriggerDeglitch, motorDiagADeglitch, motorDiagBDeglitch, pirDeglitch; // TODO: quick hack. document
+uint16_t swFrontDebounce, swBackDebounce, swTriggerDebounce, motorDiagADebounce, motorDiagBDebounce, pirDebounce; // debounce shift registers
 
 
 void setup() {

  swFrontDebounce = (swFront = swFrontDeglitch = digitalRead(switchFront)) * 0xFFFF;
  swBackDebounce = (swBack = swBackDeglitch = digitalRead(switchBack)) * 0xFFFF;
  swTriggerDebounce = (swTrigger = swTriggerDeglitch = digitalRead(switchTrigger)) * 0xFFFF;

  Serial.print(F("Door status: "));


  ledMode = (mode);\
}

// fill LED buffer with alternating colors every modulo pixels, reset state, set mode
#define setLeds2(color1, color2, modulo, mode) {\
  for (uint8_t i = 0; i < MAXPIX+EXTRAPIX; i++) {\
    leds[i] = (i % (modulo)) ? ((color2)) : ((color1));\
