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 time | |
wlan = network.WLAN(network.STA_IF) | |
wlan.active(True) | |
# Set DHCP host name to recognize the device in your router | |
wlan.config(dhcp_hostname="Heater") | |
# Replace your SSID and password | |
wlan.connect("<SSID>", "<password>") | |
while not wlan.isconnected(): | |
time.sleep(1) | |
print("WiFi connected") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment