I’m trying to write a function for a modulating theater marquee where the packets go from 1 light up to a max length and then back down to 1. I think I’ve got the right idea, but the transitions between packet lengths (whenever I fill_pallete after incrementing col_inc) come out really choppy. Can anyone suggest a way to smooth this out? For clarification I’m testing this function with a White, Black, Black, Black, etc. CRGBPalette16 like the one in the FastLED palette example. Thanks in advance!
void theater_chase_mod() {
static uint8_t col_index = 0;
static uint8_t col_inc = 0;
EVERY_N_MILLISECONDS(10) {
col_index++;
}
EVERY_N_SECONDS(5) {
col_inc++;
}
if (col_inc < 256/2) {
fill_palette( leds, numLED, col_index, col_inc, gPalette, maxBrightness, gBlending);
}
else {
fill_palette( leds, numLED, col_index, 256 - col_inc, gPalette, maxBrightness, gBlending);
}
FastLED.show();
}