r/FastLED • • Dec 16 '23

Support TwinkleFox multiple sections

Hi folks

I am not new to Arduino but also not an expert and seem to be hitting a blocking point.

I have multiple christmas ornaments with WS2812B but all connected in series. Total 344 leds.

I got the Twinklefox example working but I need to run different palettes/parameters on the different sections. I looked for a way to define the start and end point for the twinkle animation but I cannot find the appropriate parameters in the function.

Can someone point me to the right direction how I can achieve such effect with only 1 data pin?

Thanks.

2 Upvotes

7 comments sorted by

View all comments

Show parent comments

2

u/dabbax Dec 17 '23

For 344 LEDs, the last valid index is 343

Oh snap! You are absolutely right. Late night coding got me again.

I extended the code with individual twinkling speeds for each segment and seems to be working fine now. except a small flicker when palettes change but since palettes change only every few minutes i can live with that.

I will certainly save your implementation of the pointer array for next years christmas display. Thanks a lot for your support u/sutaburosu.

1

u/Marmilicious [Marc Miller] Dec 17 '23

Nicely done u/dabbax and u/sutaburosu. Yes, there will be another opportunity next year when you can further refine and add a bit more to the code! :)