Get on the Good Foot with MicroPython, Part 2 | HackerNoon
def connect(): import network sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print('connecting to network...') sta_if.active(True) sta_if.connect('<YOUR SSID>', '<YOUR PASSWORD>') while not