Hi there, I'm a FastLed library new user and i have a problem here.

Hi there,
I’m a FastLed library new user and i have a problem here.
I want to use one button to control my neopixel strip to show hue spectrum cycle . but during the loop , i found that if I want to use another button to control anything, there’s about two seconds delay…
(push another button for two seconds then another LED works )
i figure that these situation is because FastLED.show() function?
if the function wasn’t in the loop then the other button works fine.
Hope anyone can give me some suggestions , thanks!!

Hello! Can you post your code to http://gist.github.com and share the link here?

thanks for your reply, here’s my code

This code I can only change my switch by press button for two seconds. but if there’s not looping
FastLED.show() ,it looks fine.

sorry, i’ve found that if i cut the debounce to small number, it works fine… ^^

Generally I debounce buttons around 200ms. That being said, why don’t you use a button library that does everything for you, single click, double click, long press. You don’t have to deal with debouncing or writing your own routines, it’s all done in the button library for you.

@Ashley_M_Kirchner_No that sounds great!! I’ll try it. Thanks!!

@Ken_Huang Here’s an example of the DemoReel100 code modified to use a button to change patterns. Should get you started to see how it can work nicely.

I use a button library from Jeff Saltzman, as it supports single click, double click and long click and is very easy to use.

Jeff Saltzman code +1