Hydra and Multicolor led

Making some work with Glide I discovered that the method


led.TurnGreen()  // turn on Light Blue
..
led.TurnBlue() // turn on Light Green

Also other command with RGB color make same effect (blue and green reverted).
Anyone facing same problem ?

PS: NOT using last beta firmware.

There is a property to swap the colors.

:-[
I’m sorry…

Gus, I’m seeing the same issue on my spider board. I haven’t tested this with my hydra, but assume it’s the same.

GT.Color.Blue renders a Green LED
GT.Color.Green renders a Blue LED

I am on build 4.1.8.0

@ Steve. Module’s managed driver has a public bool property that you need to set to make colors right.

public bool GreenBlueSwapped { get; set; }

Thanks Architect - will this be fixed in the next build, or did you guys do that on purpose?

Also, hope to be posting some sample code on my blog as well as in the code section. Actually had some time this week to work on some bits.

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.