# This file is executed on every boot (including wake-boot from deepsleep)
# import esp
# esp.osdebug(None)
import gc

# import webrepl
# webrepl.start()
gc.collect()


def connect():
    import network

    sta_if = network.WLAN(network.STA_IF)
    if not sta_if.isconnected():
        print("connecting to wireless network....")
        sta_if.active(True)
        sta_if.connect(b"Candy", b"whatisdelicious")
        while not sta_if.isconnected():
            pass
    print("network config:", sta_if.ifconfig())

    # def no_debug():
    # 	import esp
    # 	esp.osdebug(None)

connect()