kitesurfer1404 / WS2812FX

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

is it possible to create an initial instance without parameters #347

Closed AutoPlantBali closed 6 months ago

AutoPlantBali commented 6 months ago

WS2812FX ws2812fx = WS2812FX(config.ledCount, WS2812FX_PIN, NEO_GRB + NEO_KHZ800);

to

WS2812FX ws2812fx;

I want to set the number of LEDs in the setup function because the number of dynamic LEDs is according to the configuration file or is there a function to scan the number of installed LEDs?

AutoPlantBali commented 6 months ago

finally I have found the solution, with the setLength function.

thanks you..

moose4lord commented 6 months ago

Great! There are also setPin() and updateType() functions to dynamically change the GPIO pin and neoPixelType at runtime. Just FYI.