 
 void DeActivateWell(int well) {
   Well_Active_State[well] = false;
-  Well_Active_TimeRef[well] = 15000UL;
+  Well_Active_TimeRef[well] = MAX_TIME_UL;
   Well_Active_Timer[well] = 0;
   Well_LED_OFF(well);
   sendEventCode(DW, well + 1);

    }
    // Check serial input.
    ProcessInput();
    // Process the wells.
    for (int well = 0; well < nWells; well++) {
      WellDetectThrCheck(well);
      // if well is active, check to deliver reward

unsigned long Well_IR_TimeRef[nWells];  // time reference: for IR detection
unsigned long Well_IR_Timer[nWells];    // timer for how long IR has been on.
unsigned long Well_IR_RefracTimeRef[nWells]; // timer for second detection
unsigned long TTL_IR_Detect_Timer[nWells]; // timer

unsigned long PumpTimeRef[nWells];      // time ref for pump on
unsigned long PumpTimer[nWells];        // timer for how long pump has been on
