Demo entry 6683302

micropython boot script


Submitted by scruss on Dec 12, 2017 at 17:38
Language: Python 3. Code size: 593 Bytes.

# This file is executed on every boot (including wake-boot from deepsleep)

def do_connect():
    import network
    sta_if = network.WLAN(network.STA_IF)
    ap_if = network.WLAN(network.AP_IF)
        print("AP turned off ...")
    if not sta_if.isconnected():
        print('connecting to network...')
        sta_if.connect('blert', 'phweeen') # SSID, password
        while not sta_if.isconnected():
    print('network config:', sta_if.ifconfig())

print("Starting network ...")

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).