Created
December 3, 2016 17:56
-
-
Save LarsBergqvist/271b08763e0e5ec2a5d2fd1b7cce0057 to your computer and use it in GitHub Desktop.
Basic network setup with ESP8266 and MicroPython
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
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