kitesurfer1404 / WS2812FX

WS2812 FX Library for Arduino and ESP8266
MIT License
1.58k stars 343 forks source link

serial_conrol crashes at <255 LEDs #330

Closed QubeCode closed 1 year ago

QubeCode commented 1 year ago

I have an LED strip with 300 LEDs. I wat to control it through the serial monitor. Everything works just fine when I use only 255 LEDs or less, but as soon as I use more, everything is black. P. S.: auto_mode_cycle.ino works with 300 LEDs.

moose4lord commented 1 year ago

You've run out of memory. An Arduino only has 2048 bytes of dynamic memory, and with the serial_control sketch there just isn't enough memory to accommodate 300 LEDs.

You can reduce the number of segments available by changing your WS2812FX instantiation to this:

WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800, 1, 1);

which will free up some memory and allow you to drive 300 LEDs.