ledclock/boot.py
2022-08-10 23:58:39 +02:00

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()