Also make sure your device actually got the new firmware
Try adding an additional foolproof feedback like different patterns of D7 blinks or Serial.print() statements.
After flashing the new test case few times into the RedBoard, it finally work with above case. I guess the firmware did not get updated. Then I went into testing more test cases and I found the below code would not turn off the RGB:
That’s not normal nor intended.
Although your code does not show everything, but the cause might be hidden in these parts.
One (unlikely) reason might be that any used library also “messes” with RGB or just blocks and prevents your code from reaching the second RGB.control() command.
Adding a blink in loop() might tell that.
@harrisonhjones, @ScruffR , I found the problem after loading into my full testing board instead of the Redboard. Its the missing parts in the redboard that cause an infinite loop in the while loop. I just need one RGB.control in the setup, it could be place either top or bottom of the setup (tested), but I think it could be anywhere in the setup. Thanks for the help. ps. @ScruffR, the blink suggestion really help for debugging.