RGB.control(true) within STARTUP()

Is the RGB.control(true) within the STARTUP function safe to call?

Possibly. However, there’s a better and safer way to do it. Enable this system feature in Device OS 2.0.0 and later. The setting is persistent and saved in configuration flash so you only need to do it once.

void setup() 
{
  System.enableFeature(FEATURE_LED_OVERRIDDEN);
}

That will prevent the LED from coming on at all during boot, so you won’t even get a brief white flash. This will allow time for you to really take over control of the LED from setup(), where it’s safer to do so.

1 Like

Thanks! If I wanted to reverse this, how is that done? Im using the SOM Eval board

System.disableFeature(FEATURE_LED_OVERRIDDEN);

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.