Skip to content

Instantly share code, notes, and snippets.

@eydam-prototyping
Created February 14, 2021 22:45
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 eydam-prototyping/294c943345bb14e96272e6d8648976c6 to your computer and use it in GitHub Desktop.
Save eydam-prototyping/294c943345bb14e96272e6d8648976c6 to your computer and use it in GitHub Desktop.
import network
import time
import ep_logging
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)
logger = ep_logging.colored_logger(appname="main")
logger.notice("WiFi connected")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment