 /* Program constants.
 */
 const long BAUD_RATE = 115200; // baud rate for serial communication. must match contro script
-const long DETECT_TIME_THR  = 500; // in ms
+const long DETECT_TIME_THR  = 50; // in ms
+const long DETECT_REFRAC_THR = 15000; // twenty seconds before registering a second detection
 const bool Pump_ON = LOW; // LOW activates the pump
 const bool Pump_OFF = HIGH; // HIGH deactivates the pump.
 const int nWells = 6; // number of reward wells

      case 'w':
        SelectWellToActive();
        break;
      case 'd':
        SelectWellToDeActive();
        break;

  NeoPix.setBrightness(60);
  NeoPix.fillScreen(0);
  NeoPix.show();

  delay(500);
  Serial.begin(BAUD_RATE);
  Serial.println("<");
  Serial.println("<Initiation complete. Waiting for a detection.");
  Serial.print(">");
} // end setup

//Main
void loop() {
