You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@TheLastGimbus: If the period is e.g. 500 like in your example, the value for t goes from 0 to 499, not from 0 to 500, t=500 will not be reached. The value is set twice because JLed makes sure that when Update is called for after the effects time elapsed, then the last value set, is that for period-1 or 499 in this example. This is necessary to handle edge cases like e.g.
led.Update();
delay(600);
led.Update();
Then JLed will make sure to set the LED's value to the value of t=499. Perphaps the addtional call could be optimized out, I'll have a look at it, but I don't see a problem here.
Hi!
I wanted to write my own function that would just fade led linearly (btw this should be added to this lib).
So I wrote:
...but the led never fully turned off :(
So I added some prints:
And for
LinearFadeOff usrEffOff(500);
, it prints:😕
The problem: Last value doubles instead of reaching the end 🌈
The text was updated successfully, but these errors were encountered: