 const int kVcc = D2;
 
 // tracks how many PIR reads have been high in a row
-const int reallyOnThreshold = 180;
 // 10 is too sensitive, 20 works ok
 const int onThreshold = 15;
+const int maxOn = 180;
 int highReads = 0;
 
-// 0 is off, 1 is motion, 2 is waving motion
 int motionState = 0;
 const int NO_MOTION = 0;
 const int MOTION = 1;
-const int HIGH_MOTION = 2;
 
 // used to temporarily set LED to a color
 int keepLEDColor = 0;

const int kSwitchGnd = D6;
const int kSwitchSense = D7;

const int debounceDelay = 50;
const int doubleClickDelay = 500;

int lastButtonStateChangeTime = 0;

void updateMotionState() {
  int read = digitalRead(kPir);
  if (read == HIGH) {
    highReads = min(highReads + 1, maxOn);
  } else {
    highReads = max(highReads - 3, 0);
  }
