Go Down

Topic: Addressable, button controlled fasLED strip project, any help appreciated (Read 356 times) previous topic - next topic

wardd1

Hi guys, I am hoping someone out there will be able to give me some advice on a project I am working on. I'm pretty new to this forum and Arduinos in general so please forgive my ignorance. I have had a look through the forum and can't find my problem listed so apologies if I have missed it and it's covered elsewhere

The project involves 5 strips of 60 ws2811 LEDs and one shorter strip consisting of 17 LEDS.
The shorter strip should pulse the whole strip from very dim blue to quite a vivid cyan. This pulsing effect will illuminate a central, translucent, 3D printed sculpture. After pulsing approx 3 times the 5 strips should begin to show a chasing sequence while the pulsing continues simultaneously.

I have slightly altered the ColorPalette example which comes with the fastLED library I am happy with the color sequence for the chasing pattern. And I have separately found a sketch online which gives a nice pulsing effect. The issue I have is when the trying to make the sequences run simultaneously (or appear to run simultaneously) and start with the press of a button and stop when the button is pressed again.

I am having some real trouble with this project as will be obvious to any of those who look at the codes I have attached. If anyone could give me some pointers in the right direction I would really appreciate it.

Thanks in advance.

Grumpy_Mike

Quote
The issue I have is when the trying to make the sequences run simultaneously (or appear to run simultaneously) and start with the press of a button and stop when the button is pressed again.
You need to post the code you are actually having trouble with.

I suspect you are not implementation the two codes as a state machine. In general this is a common problem with beginners.

See my
http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html
Or Robin2's several things at once
http://forum.arduino.cc/index.php?topic=223286.0

Basically you want to get rid of "for" loops with delays in them so that you can one function and then the other in quick sucession so it looks like they are happening at the same time.

Go Up