make examples consistent

This commit is contained in:
Hel Gibbons 2024-10-11 14:42:31 +01:00
parent 686e623326
commit afcbc75b0b
3 changed files with 6 additions and 6 deletions

View File

@ -6,13 +6,13 @@ This example was adapted from one written by Les Pounder for Tom's Hardware: htt
import network
import requests
from secrets import SSID, PASSWORD
from secrets import WIFI_SSID, WIFI_PASSWORD
from time import sleep
# connect to wifi
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PASSWORD)
wlan.connect(WIFI_SSID, WIFI_PASSWORD)
while wlan.isconnected() is False:
print('Waiting for connection...')
sleep(1)

View File

@ -5,13 +5,13 @@ You will need to add your wireless SSID and password to secrets.py (and save thi
import network
import requests
from secrets import SSID, PASSWORD
from secrets import WIFI_SSID, WIFI_PASSWORD
from time import sleep
# connect to wifi
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PASSWORD)
wlan.connect(WIFI_SSID, WIFI_PASSWORD)
while wlan.isconnected() is False:
print('Waiting for connection...')
sleep(1)

View File

@ -1,2 +1,2 @@
SSID = 'ssid_goes_here'
PASSWORD = 'password_goes_here'
WIFI_SSID = 'ssid_goes_here'
WIFI_PASSWORD = 'password_goes_here'