Need program for stair led project.
Closed this issue · 6 comments
I need example for using two PIR motion sesors and WS2812B led (600 pixels in total). I tried Adafruit library and I was unable to go beyond 548 leds using Arduino Uno. One member in Arduino forum mentioned about this library but I cannot find sufficient example for my setup to work.
Use the €15 Arduino nano Every. It has more memory.
@ednieuw I get this message after compiling the code
Sketch uses 4578 bytes (14%) of program storage space. Maximum is 32256 bytes.
Global variables use 230 bytes (11%) of dynamic memory, leaving 1818 bytes for local variables. Maximum is 2048 bytes.
Do you think there is memory problem?
I commented all the debug helping line. It worked
Thank you for closing this request.
For info:
Each LED uses about 3 bytes of memory for storage of the display array, like Adafruit's unless you go into the other modes (color palette or on the fly computation of the LED colors, depending on the pattern complexity). This library is more memory savvy than Adafruit's but it will only get you so far.
When a program runs it also needs a stack to call and return from functions, which may overrun your free memory and is not accounted for. The only way to know if it fits in a small memory footprint is to try it out.