What would be the best way to get multiple parts of my program to

(Johnny Woods (Masamune3210)) #1

What would be the best way to get multiple parts of my program to work at the same time? I want to have my patterns work on multiple led strips, but not the same pattern on all of the led strips at the same time.


(Randal B) #2

Do you want them always to be run separate from each other?

You can set each to its own array in the https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples Multiple led arrays

If you want to sometimes run them as a large matrix (which is what I want to do with my tree) you could probably Nest some loops for each strip before the FastLED.show?

(Johnny Woods (Masamune3210)) #3

I have three strips of led arranged vertically to look like fireworks, and have wrote patterns to imitate popular fireworks. I would like one pattern to be going on one of the strips while the other strips are doing another pattern

(Randal B) #4

I’ll be taking a crack as doing something similar with 8 strips, trying to make them run individually from each other as you are trying to. i didnt have much success doing this last year,but will be giving it another go over the next week or so.

would really like to get the Bouncy balls effect running on each strip separately, just like you want to do with your firework effect.

(Johnny Woods (Masamune3210)) #5

Tell me if you manage any successes, maybe we could share ideas.

(Juergen Bruegl) #6

Bill Earl from Adafruit has addressed this problem in his guide:

and these supplementary guides:

My coding skills aren’t advanced enough to dig in further but it would be great if an expert could have a look into it.

(Randal B) #7

Thats a fantastic write up! Hoping I can sort through moving my code to classes.

(Randal B) #8

@Johnny_Woods_Masamun I did some fiddling around and started simple to get a handle on this.

I got it working on 6 strips, running independantly with different timings (re delays).

Here is the simplified version which helped me wrap my head around converting my old effects to this setup.

(Jez Weston) #9

I’m partial to Alan Bleaklow’s minimal task manager. It implements simple co-operative multitasking and can easily be extended to run a whole bunch of tasks for concurrent pattern generation while also reading sensors and responding to inputs: