Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist
Created December 3, 2016 17:56
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 LarsBergqvist/271b08763e0e5ec2a5d2fd1b7cce0057 to your computer and use it in GitHub Desktop.
Save LarsBergqvist/271b08763e0e5ec2a5d2fd1b7cce0057 to your computer and use it in GitHub Desktop.
Basic network setup with ESP8266 and MicroPython
import network
import utime
def setup_wifi():
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
# Replace with your SSID and WiFi password
sta_if.connect('SSID', 'PASSWORD')
while not sta_if.isconnected():
utime.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment