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
Whether an LED can do PWM values depends on the IO it is driving. When a user instantiates an LED without specifying an IO, we assume it will be on builtin/digital. i.e.:
One detail to consider: PWM is a limited resource on some hosts. The ESP32, for example, as a limited number of PWM channels. You probably don't want to silently use those up on instances that only need digital (on/off).
If they don't specify the IO, could you take that as a signal that a it is acceptable to change the IO after instantiation? Then you can default to digital and upgrade to PWM if needed.
That makes sense. If they don't explicitly choose a provider or pass in an IO, we assume Digital. If a call is made to a method that requires PWM, we destroy and reopen the IO instance as PWM.
Whether an LED can do PWM values depends on the IO it is driving. When a user instantiates an LED without specifying an IO, we assume it will be on
builtin/digital
. i.e.:Should it be the other way around?
The text was updated successfully, but these errors were encountered: