Page 1 of 1

pinInstance.value() always 0 after PWM(Pin) deinitialized

Posted: Mon Feb 15, 2021 8:53 am
by mekanixms
Hi,

Playing with a ESP32 mini board I got into this issue.
Using Pin 2 as this is the onboard LED
Any idea why?

Code: Select all

>>> p=Pin(2,Pin.OUT)
>>> pw=PWM(p)
>>> pw.deinit()
>>> p.value()
0
>>> p
Pin(2)
>>> p.value()
0
>>> p.on()
>>> p.off()
>>> p.value()
0
>>> p.on()
>>> p.value()
0
>>> 


Re: pinInstance.value() always 0 after PWM(Pin) deinitialized

Posted: Mon Feb 15, 2021 9:38 am
by mekanixms
Tested on Pin 27 and the issue is there as on Pin 2
Also tested on ESP8266 and works well