Created
March 28, 2021 17:03
-
-
Save paulhayes/803dbea25cd94b27da3126520c5db6c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is executed on every boot (including wake-boot from deepsleep) | |
#import esp | |
#esp.osdebug(None) | |
#import webrepl | |
#webrepl.start() | |
import network | |
wlan = network.WLAN(network.STA_IF) | |
wlan.active(True) | |
if not wlan.isconnected(): | |
print('connecting to network...') | |
wlan.connect(ssid, passkey) | |
while not wlan.isconnected(): | |
pass | |
print('network config:', wlan.ifconfig()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment