Here’s a code sample of how to do this. I have 5 LEDs in my array,
If you only have one LED, change the first line from
arrLED = new MulticolorLed[5] { led, led1, led2, led3, led4};
to
arrLED = new MulticolorLed[1] { led};
If you have 2 LEDs, switch it to this:
arrLED = new MulticolorLed[2] { led, led1};
Here’s the demo code:
arrLED = new MulticolorLed[5] { led, led1, led2, led3, led4};
//All LEDs will turn Green
foreach (MulticolorLed myLED in arrLED)
{
myLED.TurnBlue();
}
Thread.Sleep(2000);
//fix the blue/green issue on all leds
foreach (MulticolorLed myLED in arrLED)
{
myLED.GreenBlueSwapped = true;
}
//All LEDs will now turn Blue
foreach (MulticolorLed myLED in arrLED)
{
myLED.TurnBlue();
}
Thread.Sleep(2000);
//All LEDs will now turn Off
foreach (MulticolorLed myLED in arrLED)
{
myLED.TurnOff();
}
This only happens on some of the boards. The “proper” fix will require to re-flash the module with fixed firmware. It is easier to use the property during initialization if you know for sure that your module has color swap issue.