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
I would expect, that pwm.duty(1023) will be 100%, but it's not.
E.g. for 1000Hz signal it falls to 0V each 1 second for 1micro second... hence duty is only 99.9%.
When read using pwm.duty_u16() i got back 65472.
Tested on ESP WROOM-32 with "MicroPython v1.19.1 on 2022-06-18; ESP32 module with ESP32".
I think correct would be, if duty(arg) impl should delegate to duty_u16 as 65535arg/1023. Similar reading function should read via 1023duty_u16()/65535.
Workaround is to use duty_u16 but that makes code incompatible with esp8266.