main.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:developmentBoard 作者: TPYBoard 项目源码 文件源码
def do_connect():
    sta_if = network.WLAN(network.STA_IF)
    p2 = Pin(2, Pin.OUT)
    sta_if.active(False)
    if not sta_if.isconnected():
        p2.low()
        print('connecting to network...')
        sta_if.active(True)
        sta_if.connect('TurnipSmart', 'turnip2016')
        while not sta_if.isconnected():
            pass
    if sta_if.isconnected():
        print('connect success')
        p2.high()
        print('network config:', sta_if.ifconfig())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号