r/FastLED • u/PartyPirate100 • Apr 09 '24
Support Please can someone help me write a code similar to this WLED effect
Hi I’ve spent longer than I’d like to admit trying to recreating this effect. I just need blocks of LEDs lit up and travelling down the strip throughout / continuous.
My code was based off the Cylon sample but isn’t really anything like I was hoping for!
Any help or guidance would be greatly appreciated, thank you!
36
Upvotes
27
u/Robin_B Wobbly Labs Apr 09 '24
try something like this:
10
u/TheeParent Apr 09 '24
Check out code examples from FastLED. Look up “chase” or “theater chase” or “crawling”.
5
u/chemdoc77 Apr 09 '24
Hi u/PartyPirate100 - this code will allow you to do what you are trying to accomplish:
https://github.com/chemdoc77/CD77_FastLED/tree/master/CD77_Chase_Demo
Here is a video of that code:
https://www.youtube.com/watch?v=nmstPoI-cfs
3
u/Afraid_Salamander851 Apr 10 '24
you can also do this with palettes i think, theres a few example sketches that demonstrate it
2
u/Marmilicious [Marc Miller] Apr 09 '24
Here's a few other examples for you.
https://github.com/marmilicious/FastLED_examples/blob/master/marquee_v3.ino
https://github.com/marmilicious/FastLED_examples/blob/master/candy_cane_stripes.ino
3
u/Successful-Point641 Apr 10 '24
Load this code into ChatGPT and boss it around until it improves. Tell it to add chasers, comets, rainbow effects, strobes, and interactivity. You can even tell it to run simultaneous effects at once and have them interact with each other. Make sure to save the code it delivers best on. Then you can tweak from there. All it needs is a base code to work from and it will develop from there. Have fun!
1
u/abbelsin Apr 10 '24
When I want to create a smooth effect like this I usually use sine functions because there is no single pixel movement. The speed is then not dependent on the framerate.