 
 #define C_HOLE_CLEAR 300 // The clear value used to determine the hole's arrival
 #define C_IDEAL_CLEAR 96 // The ideal clear value for color detection
-#define C_ALLOWED_COLOR_VARIANCE 64 // Allowed color variance for color detection
+#define C_ALLOWED_COLOR_VARIANCE 48 // Allowed color variance for color detection
+#define C_RETRY_UNKNOWN_COLOR 2 // If the color cannot be detected, retry this many times 
 
 #define F_TOP_SERVO_TIMEOUT_ENABLED true // Enable the timeout for the top servo
 #define C_TOP_SERVO_TIMEOUT 6000 // Timeout to determine if the top servo is stuck
 
-#define C_COLOR_SIGNAL_TIME 1000 // Each Skittle gets 1s color view signal
+#define C_COLOR_SIGNAL_TIME 3000 // Each Skittle gets 1s color view signal
 
 // Include libraries
 #include <LiquidCrystal.h>      // LCD display

#define PIN_LCD_D7 2
//    LCD R/W pin to ground

// Uncomment the following line to enter calibration mode
// #define F_CALIBRATING true // Is calibration in progress

// Constants
#define C_ATIME TCS34725_INTEGRATIONTIME_154MS //  Color sensor integration time 154ms

}

void updateColorView() {
  static int index = 0;
  unsigned long lastColorSignalTime = 0;
  if (HAS_RESULT(colorResults[index])) {
    lastColorSignalTime = millis();
    switch (colorResults[index]) {
      case 0:
        Serial.println("RED");
        analogWrite(PIN_COLOR_RED, 255);
