Hi @Ivan,
what about adding the Shimmer function also for the Led strip library?
Do you think it could be possible?
Thanks
Hi @Ivan,
what about adding the Shimmer function also for the Led strip library?
Do you think it could be possible?
Thanks
Mmmm, I have to think about it.
The WS2812B LEDs are more difficult to handle than the on-board LED outputs (that are managed inside an interrupt from a timer).
To update a +200 LEDs strip it would need +600 bytes memcpy
plus the sequence to actually send the data to the LEDs inside a interrupt handler. Sending the data can be achieved asynchronously with some effort.
My idea is to refresh the leds only with broadcast commands, not led by led.
Yours is to control led by led?
If we are still talking about WS2812B, I never heard about broadcast commands. If you have a strip with N LEDs and want to turn the LED number N on, you have to send N 24-bit color codes to the strip.
I think I can put together something for the shimmering, perhaps a function where you set a color, an offset and a frequency. All the LEDs will get the same color and will do the shimmering with the same value. No need to copy memory in this case.
Added as a feature request.
Sorry @Ivan, a lack of english… I meant like your LedStrip::Set with the index at 0
Having RGB leds is up to you, depending on the complexity, to have the possibility to choose for each color the parameters like brightness, range and frequency
Hi @Mangaman,
The LedStrip::set
function just sets a buffer in RAM with the given color. This buffer is an internal representation of the LED strip; it holds the values that will be actually sent to the LEDs when you call LedStrip::update
.
What the shimmer function will do is to use a base color (provided by the user), an offset (for example, shimmer from that given color, with brightness-10 to brightness+10) and the frequency (in Hz). This way the same color is sent to all the LEDs, bypassing the representation in the memory buffer (no need to copy memory). The thing is that all the LEDs will receive the same color, but that could be OK for this case.
Played with the LedStrip today using a strip with 60 WS2812B LEDs, works great Looking forward to trying the Shimmer function when it’s ready.
Will do it this evening.
Thanks!
Great. Looking forward to testing it.
Thanks.
Works great, nice!
Thanks
I only checked the shimmer function and works ok.
I’m going on vacations for two weeks so I will continue at my return