Hey, I am using a Teensy 3.2 and Adafruit’s Dotstar (APA102). I have separate sections of my LED strip that will each need a different brightness. Along with that, when I modify the color and brightness of one section and then modify another, I do not want the first section’s color nor brightness to change. I am able to get the colors to change independently, but not the brightness. I tried to use fadeToBlackBy in the same loop as when I’d set the colors (via CRGB), but it would modify all of the LEDs on the strip not just the section itself.
My loop looks like this:
for (int j = SectionLEDs[i]; j < SectionLEDs[i + 1]; j++)
{
leds[j] = CRGB(colorArray[2], colorArray[1], colorArray[0]);
leds[j].fadeToBlackBy(brightness);
}
FastLED.show();
Is there something that I am missing or a better way of modifying brightness on only a certain amount of LEDs?
Thanks for the reply! I actually used that post as my original reference. I just am having no luck with the fadeToBlackBy function and am unsure if I am missing something when writing to one section and another right after.
I am aware of the HSV function, but am trying to avoid rewriting much of my code’s functions.
The sections are not on different pins, but thanks for the idea.