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
{{ message }}
This repository has been archived by the owner on Dec 8, 2019. It is now read-only.
The maximum analogWrite on the ESP8266 value is not 255 (as in the code) but 1023. Because of that the LED is much less bright than it could theoretically be.
Adapting the map-command results in the following problems:
larger datatype for the real"Color" variables needed (int would be fitting)
the timing concerning fadetimes is different (positive about it: the LED can be dimmed much more smoothly due to more steps)
I tried adapting the code but I failed at the transition-part.
The following piece of code (in the callback-function) should work fine:
realBrightness, realRed, realGreen, realBlue must now be integer-variables.
Now theoretically only the problem with the fade time is left: I tried increasing the number of steps from 1020 to 4090 or so... but then I failed making the whole process faster (more steps @ same time -> the Count-Loop must be processed more oftenly -> the whole loop must be faster)...
By the way you also need to adapt the following if-condition:
// Defensive driving: make sure val stays in the range 0-255
if (val > 1023) {
val = 1023;
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The maximum analogWrite on the ESP8266 value is not 255 (as in the code) but 1023. Because of that the LED is much less bright than it could theoretically be.
Adapting the map-command results in the following problems:
I tried adapting the code but I failed at the transition-part.
The following piece of code (in the callback-function) should work fine:
realBrightness, realRed, realGreen, realBlue must now be integer-variables.
Now theoretically only the problem with the fade time is left: I tried increasing the number of steps from 1020 to 4090 or so... but then I failed making the whole process faster (more steps @ same time -> the Count-Loop must be processed more oftenly -> the whole loop must be faster)...
By the way you also need to adapt the following if-condition:
// Defensive driving: make sure val stays in the range 0-255
if (val > 1023) {
val = 1023;
}
The text was updated successfully, but these errors were encountered: