Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Question: WS2812B and interrupt issues #778
I am very newbie with Arduino and FastLED, so sorry if this question is very basic. I am trying to implement a very simple feature for an Android app and an Arduino UNO to turn on / off a WS2812B led strip. I have implemented the communication sending a string with the RGB color and a timeout period in milliseconds (not used at the moment).
Everything seem to work properly but I am experiencing some issues when a color is displayed for more than 20/30 seconds. It gets stuck and I cannot change color nor disable the LEDs.
where R, G, B and TIMEOUT are integers.
I would appreciate any advice. Thanks in advance
This is my sketch:
One possibility might be power draw and undercoating the controller, causing it to shut down - you can test for that by setting Num leds to something like 2 or 3.
Also - with the print output - you can determine exactly where it isn’t coming out of - is it stuck in one of the serial parseInt calls, for example? Or is serial just never becoming available? Etc...
The moment it freezes is random and not related to the serial reads (it stops even if I only send one command and keep the LEDs on).
I tested setting the num leds to 2 and it works fine. The power supply is USB so it seems to be a power draw problem.
Thank you very much for your help!