n00b stuck on seemingly simple operation.??

I recently bough an Arduino & a Cpl of strips of Neo Pixels to use as lighting in my van. I want to edit the adafruit 'strandtest' sketch so that each loop (lighting effect) runs until a button is pressed which then moves the program onto the next loop.

Seems so easy in principal, but it's pickling my brain. [note] I am a complete n00b too!!

I've run through the basic tutes with LED's and buttons and that makes sense, but can't seem to implement it into the strandtest. Is it just a case of running the loop and monitoring a button to read either hi or low (depending on what it's set to)? Is that an efficient way of doing it..if it's even right?

Cheers in advance, Nik

Code would help :)..

In essence, yes, you are right. But you want to compare the the current state of the push button switch with what it was, and only if it has changed perform some action. But beware of the delay() function!

cheers for the swift responses!

sorry ky' no code to show as I'm at work at the mo'..the strandtest sketch seems pretty basic however with a number of lighting effects that loop, using delay(wait) to move onto the next.

I'll go back and look at setting up the button this eve and see if I can make some progress. :slight_smile: