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

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
mekanixms
Posts: 28
Joined: Fri Oct 18, 2019 3:46 pm

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

Post by mekanixms » Mon Feb 15, 2021 8:53 am

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
>>> 


mekanixms
Posts: 28
Joined: Fri Oct 18, 2019 3:46 pm

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

Post by mekanixms » Mon Feb 15, 2021 9:38 am

Tested on Pin 27 and the issue is there as on Pin 2
Also tested on ESP8266 and works well

Post Reply