nixiesp12/boot.py

18 lines
338 B
Python
Raw Normal View History

2017-07-13 19:49:53 +00:00
2017-08-25 21:45:57 +00:00
# Disable AP
2017-07-13 19:49:53 +00:00
import network
2017-08-25 21:45:57 +00:00
ap_if = network.WLAN(network.AP_IF)
ap_if.active(False)
print("Access point disabled")
# Connect to wireless network as client
2017-07-13 19:49:53 +00:00
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect("Robootikaklubi", "u4HNj3sgYK")
2017-08-25 21:45:57 +00:00
while not sta_if.isconnected():
pass
2017-07-13 19:49:53 +00:00
# Clean up
import gc
gc.collect()