neroroxxx / RoxMux

Collection of Multiplexer Controllers for some commonly used multiplexer chips.
Other
15 stars 5 forks source link

How to slowly fade in/out LEDs? #6

Closed mavoIn closed 11 months ago

mavoIn commented 11 months ago

Hi,

can anyone explain to me how to slowly increase / decrease the brightness of LEDs? There's no fade in/out mode available for LEDs at the moment, or?

I would like to combine the fading effect with the Rox74HC595 lib.

Thank you very much.

Best mavoIn

neroroxxx commented 11 months ago

You can only do this using a timer, i'll add a new class for fading leds to the RoxMux library

neroroxxx commented 11 months ago

Version 1.7.0 includes RoxFadingLed, keep in mind you can't use it with the 74HC595 as that is a digital multiplexer, the only way to do it would be to wire the enable pin of the 74HC595 to a PWM pin on your board then use that pin as the pin for RoxFadingLed, however, this will cause all the leds connected to the 74HC595 to fade at the same rate.

mavoIn commented 11 months ago

Hello,

wow! thank you very much! I will test this small lite chrismas present during my holidays. Best mavoIn