Skip to content

Instantly share code, notes, and snippets.

Created September 10, 2017 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1857130d5c1da5d19eb09f20038b7f5f to your computer and use it in GitHub Desktop.
Save anonymous/1857130d5c1da5d19eb09f20038b7f5f to your computer and use it in GitHub Desktop.
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('SSIDname', 'password')
while not sta_if.isconnected():
pass
print('network config:', sta_if.ifconfig())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment