p9 = Pin(9, Pin.IN)
while True:
if(p9.value()==0):
print("OK")
time.sleep_ms(1000)
报错如下:
MicroPython v1.18 on 2022-01-17; ESP module (1M) with ESP8266
Type "help()" for more information.
Sending main.py...
SUCCESS: 146 bytes written
>>>
MPY: soft reboot
G10可以G9不可以,G9用作输出也不行,输入也不行。