Gadgeteer MutliColorLED turns blue when you tell it to turn green??

I'm hacking on the Gadgeteer platform with my GHI Spider board and working with the MultiColorLED module (5 of them to be exact).  I ran across an oddity when you call the .TurnBlue() method, the LED actually turns Green.  When you call .TurnGreen(), the LED turns Blue.  This behavior has been reported here and here

As I mentioned before, I have 5 LEDs in my array, In the sample code below, 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();
            }

No Comments

Post Reply