18 lines
No EOL
396 B
Python
18 lines
No EOL
396 B
Python
import esp
|
|
import webrepl
|
|
import config
|
|
|
|
def connect_wifi(ssid, psk):
|
|
import network
|
|
sta_if = network.WLAN(network.STA_IF)
|
|
if not sta_if.isconnected():
|
|
sta_if.active(True)
|
|
sta_if.connect(ssid, psk)
|
|
while not sta_if.isconnected():
|
|
pass
|
|
return(sta_if.ifconfig())
|
|
|
|
esp.osdebug(None)
|
|
|
|
connect_wifi(config.WIFI_SSID, config.WIFI_PSK)
|
|
webrepl.start() |