Hi folks - how do you get / read the color of a specified LED? I have a function that I only want to perform on an led if it is a particular color. So I’m trying to do something like this, which doesn’t work b/c of different data types:
if (leds[i] == CRGB::White) { }
I have searched this community, the API doc, etc. and haven’t found a nontrivial way to do this.
Thanks Marc! Related question – if an LED is a dimmed version of white (e.g. using fadeLightBy), then would r/g/b all be equal, and just less than 255? Or does FastLED dim some other way?
Ultimately what I am trying to do is dim only the White LEDs b/c they are so much brighter than the non-white ones. And I want to be able to dim them in steps, say 25% at a time.
Like white, I believe the R,G,B values of a light grey, medium grey, and dark grey will be equal. Easy to test by printing the values of a LED to the serial monitor while dimming it down.
So, for patterns that involve a lot of White LEDs, would a 4-in-1 RGBW be more energy efficient? The way I see it is, to make White in an RGB strip, you need all 3 LEDs at full power (60mA). But if you had a dedicated White LED, then you would only need that one turned on, presumably at 20mA. Am I thinking about this correctly?
I guess, not really. If you have 3 R, G & B leds running at 33% each you can expext a similar brightness like from one white led at 100%. Maybe the white one is slighly more efficient, but I wouldnt expect dramatic more light/mA. A white led is basically a blue one where the emmited light is transformed into longer wavelengths.
Ah - so when you’re making “full brightness” white with an RGB, it isn’t 100% current through each color, it’s only 1/3? It just seems like my white LEDs are dramatically brighter than any non-white mix and I figured that was the reason.
I would expect that 100% of r, g & b has as similar brightness, like 3 white leds at 100%. If your strip shows a different behaviour my assumtion is wrong. Keep in mind, that the emission angle of a led has a massive influence of the seen brightness. To really compare you need a diffusor, for example a table tennis ball with a hole in it for the led - than you can compare the amount of emmited light well.
Right – but a 4-in-one RGBW has only one white LED. So theoretically I’m thinking it should produce white with just 20 mA (full brightness), the equivalent of one individual R, G, or B LED.