       while (true)
       {
         tcs.getRawData(&r, &g, &b, &c); //get env info
+        bool rChange = false;
         if (r > r_h)
         {
+          rChange = true;
           r_h = r;
           if (b_h < b)
           {
             b_h = b;
           }
         }
-        else if (g > g_h)
+        if (g > g_h)
         {
           g_h = g;
           if (b_h < b)

    Serial.println("Please enter a number between 0 and 7!!");
}


#define thErrON 0.9 //threshold multipler HIGH leds
#define thErrOFF 1.5 //threshold multipler LOW leds
#define setupWaitTime 1 //(ms) delay at setup time 
#define fbTime 30 //(ms) feedback led on time
#define cycTime 30 //(ms) feedback led off time
#define sync "MODE_sync" // keyword for start sync seq (transmitter side)
#define recal "MODE_recal" // keyword for start sync seq (receiver side)
#define partyM "MODE_party" // keyword for party mode (easter egg)
#define crdM "MODE_credits" // keyword to show contributors
#define ledContol "MODE_ledC" //open led control modes
#define initDelay 30 //(ms) synchronization sequence delay
#define redONtime 20 //(ms) 
#define redOFFtime 20 //(ms)
#define trnsDELAY 0 //(ms)

void randomLed();
void flashDotOrDash(int color, bool dotOrDash);
void synchronization();
void flashSequence(char sequence);
