Skip to content
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

Turn LEDs off on startup #141

Open
OrmeAudio opened this issue Jun 13, 2022 · 2 comments
Open

Turn LEDs off on startup #141

OrmeAudio opened this issue Jun 13, 2022 · 2 comments

Comments

@OrmeAudio
Copy link

Hi! Fantastic work!

Is it possible to turn all led's (ws2812b) off on startup ? Or not turn them on ?

At the moment all led's turn white, I would like to avoid the power surge.

My cpp is a bit rusty, but I'm happy to do a PR if you point me in the right direction.

Thanks!

@ulri-me
Copy link

ulri-me commented Nov 18, 2022

Hi,

I have never worked with this lib and the WS2812b LEDs.

But have a look at this reddit discussion:
https://www.reddit.com/r/arduino/comments/d5yjmt/ws2812b_default_color_after_power_on/

The question is if the library does anything itself to start the LEDs with full white.

As far as I can see the only DMX output buffer initialisation with a default value is this line

memset(_dmx->data1, 0, 512);

which stores 0 as default value for a newly created DMX buffer.

And for the LED strip itself does this line

pixDriver.setStrip(0, DMX_TX_A, deviceSettings.portAnumPix, deviceSettings.portApixConfig);

execute this function
void ws2812Driver::setStrip(uint8_t port, uint8_t pin, uint16_t size, uint16_t config) {

which also clears the buffer to 0's by calling this function
void ws2812Driver::clearBuffer(uint8_t port, uint16_t start) {

@ulri-me
Copy link

ulri-me commented Nov 18, 2022

So I would assume you have to be faster with starting the output (or even start the output before powering up the LED strip) or get this capacitor trick from Reddit to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants