You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
476 B
Python
25 lines
476 B
Python
import esp
|
|
import gc
|
|
import network
|
|
|
|
esp.osdebug(None)
|
|
gc.collect()
|
|
|
|
|
|
def connect():
|
|
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()
|