# ok...2 nice and easy ones for you lot! im looking for a 1 numbered

ok…2 nice and easy ones for you lot!

im looking for a 1 numbered way to fade and brighten an led.

i can increase r, g, and b individually, and i can use master brightness, but is there a way to have the brightness per led controllable?

and 2,

a single strip of adressable, and splitting the strip into 6 parts (each part has 2 leds)

CRGB backLed[2][2];

i dont really know how to offset the led start number.

Not positive what you mean by a “numbered way” to fade/brighten a pixel, but if you use HSV instead of RGB it’s easy to set each pixel’s individual brightness. Perhaps something like:
uint8_t value = 0;
for (int i=0; i<NUM_LEDS; i++) {
leds[i] = CHSV(80,255,value);
value = value + random8(10,20);
if (value >= 255){ value = 0; } // reset to zero.
}

Or maybe value is based on a fast changing input of some sort:
for (int i=0; i<NUM_LEDS; i++) {
value = map(value, 0, 1023, 0, 255);
leds[i] = CHSV(80,255,value);
delay(10);
}

Or maybe it’s time driven:
for (int i=0; i<NUM_LEDS; i++) {
value = millis()/100;
leds[i] = CHSV(80,255,value);
}

leds[i] = CHSV(80,255,value);

thats what im looking for, 1 number to change the light brightness!

For your second question, do you actually have 6 separate strips, each hooked to it’s own data/clock pins? Or do you have a single strip you just want to control in blocks of two pixels at a time? Or something else?

If the first setup then I think it would be something like:

If the second setup then you could do something like this (which will light light up every two pixels up with a new color every two seconds):

uint8_t hue = random8(0,61);
EVERY_N_SECONDS(2){
for (int i=0; i < NUM_LEDS/2; i++) {
uint8_t position = 2*i;
leds[position] = CHSV(hue,255,255);
leds[position+1] = CHSV(hue,255,255);
hue = hue + random8(30,71);
}
FastLED.show();
}

Its the second version, but trying to control like the first version.

I thought it would be easier bredking thr strip (coding, not phydivally) into its entities, but alas, it wasnt!

Thanks

For the second, you can say:

CRGB leds[6][2];

And now you have a two dimensional array of CRGB objects - 6 arrays of 2 objects then when you do the addLeds call: