Hey guys, wondering if I could get some help
i’m trying to run two different sets of lights, one using the “juggle” pattern, the other using the “BPM” pattern. I can run it with in the demoreel creating another definition for the data pin and leds addressed with a “2” but it runs the pattern in the sequence it appears. How can I avoid this?
You might need to post your code to pastebin or gist to make sure we understand what you’re trying to do, but here’s my guess as to what’s happening. Each time FastLED.show() is called it will display whatever pixel values have been set up to that point in the loop.
If you run pattern A and then show() you’ll see whatever values pattern A set. If you then call pattern B and call show() you’ll see whatever changes pattern B has introduced. Note, pattern B might have completely change all LED values or maybe only some of them at this point. But the important thing to realize here is that you’ve displayed the pixels twice, once after each pattern.
If you want everything to update and display together you need to run pattern A, then pattern B, and THEN call show(), just once, after all pixel values have been updated. This works with using multiple strips (that you want all to be updated at the same time) or when having multiple patterns effect pixel values on a single strip. For example, pattern A could fill a strip with a solid color, and then pattern B could make every 5th pixel white, and THEN show() could be called.
Also check out “Two Animations At The Same Time”: https://plus.google.com/112916219338292742137/posts/FjfHnDP5tPK