Is it possible to set the brightness of individual LEDs different from others?

Is it possible to set the brightness of individual LEDs different from others?

For example, if I have some ‘walking’ pixel of blue on a line of blue LEDs, which are at 50% of the brightness of the ‘walking’ pixel?

(if that makes sense… I’m not sure it does even to me… :slight_smile: )

.setBrightness() affects the entire leds[] array. If you’re working with HSV, you can set each pixel’s (V)alue to affect how bright they are in relation to the next.

Sure, after you set an LED’s value you can individually scale it - eg leds[I] /= 2; will halve the brightness or you can scale it by another factor - leds[I].nscale8(192); (scale to 75% brightness), etc… There should be a wiki page that describes this (on a phone in a warehouse workshop at the moment with crappy connectivity, otherwise I’d look it up)

Or another way to look at it:
led[0] = CRGB::White;
led[1] = led[0].nscale8(192) ;

I thought led[0] / 2 should work, but the complier says:
ISO C++ says that these are ambiguous

Because it needs to be /= not / …

That does work, but I wanted to assign led[1] without affecting the value of led[0].

My C++ is rusty. I think that this is what I meant:
led[0] = CRGB::White; // an integer
led[1] = CRGB(led[0]) / 2; // an object

It was ambiguous because I needed the cast to turn the 16 bit integer into a CRGB object which could be divided that way.

I just learned this from Mark Kriegsman’s recent post. Yay me.
https://plus.google.com/112974620627169436992/posts/838CjJZDzPz

Also - nscale8 changes the value of the led that you call it on.

Fantastic! Thanks Daniel and Paul - exactly what I wanted.