New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change number of leds in sketch #543

Closed
ghost opened this Issue Dec 26, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@ghost

ghost commented Dec 26, 2017

The number of leds is set in setup can you change it in the loop?

@tonton81

This comment has been minimized.

Show comment
Hide comment
@tonton81

tonton81 Dec 26, 2017

i set it dynamically in one of my demos so yes

tonton81 commented Dec 26, 2017

i set it dynamically in one of my demos so yes

@tonton81

This comment has been minimized.

Show comment
Hide comment
@tonton81

tonton81 Dec 28, 2017

fastled controller over i2c/spi/websockets

its quite a big project i worked on

tonton81 commented Dec 28, 2017

fastled controller over i2c/spi/websockets

its quite a big project i worked on

@parmarravi

This comment has been minimized.

Show comment
Hide comment
@parmarravi

parmarravi Mar 12, 2018

How to change the number of leds dynamically?

parmarravi commented Mar 12, 2018

How to change the number of leds dynamically?

@marmilicious

This comment has been minimized.

Show comment
Hide comment
@marmilicious

marmilicious Mar 14, 2018

@dwc56 @parmarravi The FastLED library wasn't really designed to have NUM_LEDS be variable, but if you search here and in the G+ group you might find a few solutions.
The easiest work around is to define NUM_LEDS with the maximum number of pixels you'll ever light up, and then use a second variable which you can vary and use in your code as needed.

marmilicious commented Mar 14, 2018

@dwc56 @parmarravi The FastLED library wasn't really designed to have NUM_LEDS be variable, but if you search here and in the G+ group you might find a few solutions.
The easiest work around is to define NUM_LEDS with the maximum number of pixels you'll ever light up, and then use a second variable which you can vary and use in your code as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment