updating variable names from guide feedback
Updating SSID and SSID password variables to match settings dot toml example page
This commit is contained in:
parent
d67dd664ab
commit
d23df184fb
6 changed files with 6 additions and 6 deletions
|
|
@ -13,7 +13,7 @@ import adafruit_requests
|
||||||
import adafruit_ahtx0
|
import adafruit_ahtx0
|
||||||
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
|
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
|
||||||
|
|
||||||
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
|
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
|
||||||
|
|
||||||
aio_username = os.getenv('aio_username')
|
aio_username = os.getenv('aio_username')
|
||||||
aio_key = os.getenv('aio_key')
|
aio_key = os.getenv('aio_key')
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ i2c = busio.I2C(board.GP1, board.GP0)
|
||||||
aht20 = adafruit_ahtx0.AHTx0(i2c)
|
aht20 = adafruit_ahtx0.AHTx0(i2c)
|
||||||
|
|
||||||
print("Connecting to WiFi...")
|
print("Connecting to WiFi...")
|
||||||
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
|
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
|
||||||
|
|
||||||
print("Connected to WiFi!")
|
print("Connected to WiFi!")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ print()
|
||||||
print("Connecting to WiFi")
|
print("Connecting to WiFi")
|
||||||
|
|
||||||
# connect to your SSID
|
# connect to your SSID
|
||||||
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
|
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
|
||||||
|
|
||||||
print("Connected to WiFi")
|
print("Connected to WiFi")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import socketpool
|
||||||
import microcontroller
|
import microcontroller
|
||||||
import adafruit_requests
|
import adafruit_requests
|
||||||
|
|
||||||
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
|
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
|
||||||
|
|
||||||
# Use cityname, country code where countrycode is ISO3166 format.
|
# Use cityname, country code where countrycode is ISO3166 format.
|
||||||
# E.g. "New York, US" or "London, GB"
|
# E.g. "New York, US" or "London, GB"
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import adafruit_requests
|
||||||
quotes_url = "https://www.adafruit.com/api/quotes.php"
|
quotes_url = "https://www.adafruit.com/api/quotes.php"
|
||||||
|
|
||||||
# connect to SSID
|
# connect to SSID
|
||||||
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
|
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
|
||||||
|
|
||||||
pool = socketpool.SocketPool(wifi.radio)
|
pool = socketpool.SocketPool(wifi.radio)
|
||||||
requests = adafruit_requests.Session(pool, ssl.create_default_context())
|
requests = adafruit_requests.Session(pool, ssl.create_default_context())
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ tweet_query = 'https://api.twitter.com/2/tweets/search/recent?query=NEW GUIDE fr
|
||||||
|
|
||||||
headers = {'Authorization': 'Bearer ' + os.getenv('bearer_token')}
|
headers = {'Authorization': 'Bearer ' + os.getenv('bearer_token')}
|
||||||
|
|
||||||
wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
|
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
|
||||||
|
|
||||||
pool = socketpool.SocketPool(wifi.radio)
|
pool = socketpool.SocketPool(wifi.radio)
|
||||||
requests = adafruit_requests.Session(pool, ssl.create_default_context())
|
requests = adafruit_requests.Session(pool, ssl.create_default_context())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue