I was interested to know if it is possible to have animations change with

I was interested to know if it is possible to have animations change with button press.

Definitely! @Andrew_Tuline put together a great example here: https://gist.github.com/atuline/9ea9b277c1e9be341a41

Yoiks, I don’t even remember that one. :0

Thank you. That was what I was looking for. Sadly I don’t understand most of it.

You might want to do what I did, which was to learn/hack code written by others, and then write my own small test programs for different things I wanted to learn, build upon them and slowly integrate them over time. I then threw it all out and started from scratch . . . several times.

Can you please tell me,
Which library is used in the example sketch?

As it fails when complie

@Soumitra_Paul in this sketch make sure you input where it says #define LED_TYPE which LEDs strips your using ie. WS2812, ws280. What are you CLK and DATA pins connected on your arduino. The color order RGB, GRB. I would guess that you need to download the button library at JChristensen’s Button Library from GitHub - JChristensen/JC_Button: Arduino library to debounce button switches, detect presses, releases, and long presses.
GitHub - JChristensen/JC_Button: Arduino library to debounce button switches, detect presses, releases, and long presses

Thanks Matthew, it worked for me.

I was getting error in compiling…

exit status 1
no matching function for call to ‘Button::Button(const int&, bool, bool, int)’

Now it compiled correctly.
Again Thanks…

That’s because you didn’t download and install the button library that was listed in the comments at the top of the program.

Andrew Tuline thats exactly what ive been doing to learn! hack apart modify and put back together and cross my fingers it works lol

Hey guys thanks for the post. I downloaded everything here and cant get the button feature to work. It all uploaded fine and leds are working. but jumping pin 6 to ground does nothing. any suggestions??

Joe, the button library comes with some examples. Did you wire it up and test those examples first? I always make sure I play around with and understand a library (or technique) before I attempt to integrate it with other code.

Andrew
Thanks for responding. Yes i did load the example and i did not have any luck getting that to work. I used a jumper wire from gnd to pin 2. no response from the led on pin 13.
Thank you

Currently im using switch case to change patterns on my code

This is my current code. Works just fine on arduino uno, flora, and attiny85. Hope it helps

http://pastebin.com/Bz6WC57B

Thanks for the code. It turned out to be a very simple problem… The kit i purchased has a bunch of breadboard jumpers. Well what are the chances the one i am using is somehow bad. I tried a different one and it works. Sorry but thanks for your help.

No problem :slight_smile: