Skip to content

Commit 06fcc8e

Browse files
committed
Secrets Cleanup: P Part 1
- fix PyPortal_CMA_Art_Frame
1 parent f237410 commit 06fcc8e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

PyPortal/PyPortal_CMA_Art_Frame/code.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@
1212
WIDTH = board.DISPLAY.width
1313
HEIGHT = board.DISPLAY.height
1414

15-
# Get WiFi details, ensure these are setup in settings.toml
15+
# Get WiFi details and Adafruit IO keys, ensure these are setup in settings.toml
16+
# (visit io.adafruit.com if you need to create an account, or if you need your Adafruit IO key.)
1617
ssid = getenv("CIRCUITPY_WIFI_SSID")
1718
password = getenv("CIRCUITPY_WIFI_PASSWORD")
19+
aio_username = getenv("ADAFRUIT_AIO_USERNAME")
20+
aio_key = getenv("ADAFRUIT_AIO_KEY")
1821

19-
if None in [ssid, password]:
22+
if None in [ssid, password, aio_username, aio_key]:
2023
raise RuntimeError(
21-
"WiFi settings are kept in settings.toml, "
24+
"WiFi and Adafruit IO settings are kept in settings.toml, "
2225
"please add them there. The settings file must contain "
2326
"'CIRCUITPY_WIFI_SSID', 'CIRCUITPY_WIFI_PASSWORD', "
24-
"at a minimum."
27+
"'ADAFRUIT_AIO_USERNAME' and 'ADAFRUIT_AIO_KEY' at a minimum."
2528
)
2629

2730
#pylint: disable=line-too-long

PyPortal/PyPortal_CMA_Art_Frame/settings.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77

88
CIRCUITPY_WIFI_SSID="your-wifi-ssid"
99
CIRCUITPY_WIFI_PASSWORD="your-wifi-password"
10+
ADAFRUIT_AIO_USERNAME="my_username"
11+
ADAFRUIT_AIO_KEY="my_key"
12+
CIRCUITPY_PYSTACK_SIZE=2048

0 commit comments

Comments
 (0)