Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file is executed on every boot (including wake-boot from deepsleep)
- def do_connect(ssid, pwd):
- import network
- sta_if = network.WLAN(network.STA_IF)
- if not sta_if.isconnected():
- print('connecting to network...')
- sta_if.active(True)
- sta_if.connect(ssid, pwd)
- while not sta_if.isconnected():
- pass
- print('network config:', sta_if.ifconfig())
- # This file is executed on every boot (including wake-boot from deepsleep)
- #import esp
- #esp.osdebug(None)
- # Attempt to connect to WiFi network
- do_connect('SSID', 'your-wlan-password')
- import webrepl
- webrepl.start()
Advertisement
Add Comment
Please, Sign In to add comment