Adafruit_WS2801 strip = Adafruit_WS2801(4, dataPin1, clockPin1);Adafruit_WS2801 strip2 = Adafruit_WS2801(4, dataPin2, clockPin2);
strip.begin(); strip2.begin(); // Update LED contents, to start they are all 'off' strip.show(); strip2.show();
Are the two strips suppose to show the same thing?
I would like both strips to run the same sequence in time with each other, but also be able to have different sequences after the push of a button.
complete Newbie here so please be gentle
however it performs colorWipe2 after it finishes colorWipe
Please post your code in code tags. Most forum members use phones and tablets most of the time and cannot open .ino attachments. The sticky post at the top of the forum section will show you how, and other useful stuff to get the most out of the forum, so please read it.
Is there a reason why you have connected the two strips to two pairs of Arduino pins, instead of daisy-chaining the two strips so that only one pair of pins is needed? You were not very clear what exactly you need help with, saying that your "future self" would sort out some problems. So is this the thing you are asking for help with today? If so, this is one of the most commonly asked questions asked by beginners on this forum. How to get more than one thing to run at the same time. For example how to run two patterns at once (either the same pattern or two different patterns) or how to run a pattern and simultaneously monitor a button to see if it had been pushed. This post will show you the technique you need to use. It boils down to this: the delay() function is your enemy, but getting rid of it is not easy.
What you need to do is to implement your colour changing patterns as a "state machine", I have posted examples of this a few times in this forum. It is based on the techniques used in the blink without delay example in the IDE.Basically you have to interleaved the two colour changing functions with just one step for each and then display.Like my reply herehttps://forum.arduino.cc/index.php?topic=412232.0