QUERY · ISSUE
ESP32 Read PWM-GPIO Value
enhancement
Is it possible to implement a read back of the current gpio status for a pin that is driven by the pwm module? I would need it in combination with the @micropython.viper decorator.
from machine import Pin,PWM
p0 = Pin(0, Pin.OUT)
pwm = PWM(p0, freq=100, duty=512)
print(p0.value())
CANDIDATE · ISSUE
pwm.deinit() can not close Pin if Duty Cycle set to 1023
port-esp8266
Hi I was using the latest nightly built for esp8266 that is esp8266-20190430-v1.10-304-g8031b7a25. I setup GPIO Pin 5 as a PWM pin and set the frequency to 1000. the deinit() method works fine for all the other duty cycles except when the duty cycle is set to max 1023.
Code
from machine import Pin, PWM
pwm = PWM(Pin(5))
pwm.freq(1000)
pwm.duty(1023)
pwm.deinit()##Does not work in this case