发帖
0 0 0

ESP8266 12f开发板G9引脚不能用作GPIO

dongxuehang
新手上路

1

主题

0

回帖

20

积分

新手上路

积分
20
ESP8266系列 4130 0 2022-4-6 14:59:37
本帖最后由 dongxuehang 于 2022-4-6 15:20 编辑

mainn.py脚本如下:
from machine import Pin
import time

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用作输出也不行,输入也不行。



──── 0人觉得很赞 ────
temp.png
开发板.png

使用道具 举报

您需要登录后才可以回帖 立即登录
高级模式
返回
统计信息
  • 会员数: 28575 个
  • 话题数: 40660 篇