Skip to content

Commit d73c295

Browse files
brentrubrentru
authored andcommitted
wifi_settings.py, agnostic of SPI or AT library
1 parent d3762a1 commit d73c295

5 files changed

+17
-17
lines changed

examples/adafruit_io_simpletest_data.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
# Import Adafruit IO REST Client
1414
from Adafruit_IO import RESTClient, AdafruitIO_RequestError
1515

16-
# Get wifi details and more from a esp32spi_settings.py file
16+
# Get wifi details and more from a wifi_settings.py.py file
1717
try:
18-
from esp32spi_settings import settings
18+
from wifi_settings.py import settings
1919
except ImportError:
20-
print("WiFi settings are kept in esp32spi_settings.py, please add them there!")
20+
print("WiFi settings are kept in wifi_settings.py.py, please add them there!")
2121
raise
2222

2323
# PyPortal ESP32 Setup
@@ -32,8 +32,8 @@
3232
# Set your Adafruit IO Username and Key in settings.py
3333
# (visit io.adafruit.com if you need to create an account,
3434
# or if you need your Adafruit IO key.)
35-
ADAFRUIT_IO_USER = esp32spi_settings['adafruit_io_user']
36-
ADAFRUIT_IO_KEY = esp32spi_settings['adafruit_io_key']
35+
ADAFRUIT_IO_USER = settings['adafruit_io_user']
36+
ADAFRUIT_IO_KEY = settings['adafruit_io_key']
3737

3838
# Create an instance of the Adafruit IO REST client
3939
io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi)

examples/adafruit_io_simpletest_digital_out.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
# Import Adafruit IO REST Client
1515
from Adafruit_IO import RESTClient, AdafruitIO_RequestError
1616

17-
# Get wifi details and more from a esp32spi_settings.py file
17+
# Get wifi details and more from a wifi_settings.py.py file
1818
try:
19-
from esp32spi_settings import settings
19+
from wifi_settings.py import settings
2020
except ImportError:
21-
print("WiFi settings are kept in esp32spi_settings.py, please add them there!")
21+
print("WiFi settings are kept in wifi_settings.py.py, please add them there!")
2222
raise
2323

2424
# PyPortal ESP32 Setup

examples/adafruit_io_simpletest_feeds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# Import Adafruit IO REST Client
1313
from Adafruit_IO import RESTClient
1414

15-
# Get wifi details and more from a esp32spi_settings.py file
15+
# Get wifi details and more from a wifi_settings.py.py file
1616
try:
17-
from esp32spi_settings import settings
17+
from wifi_settings.py import settings
1818
except ImportError:
19-
print("WiFi settings are kept in esp32spi_settings.py, please add them there!")
19+
print("WiFi settings are kept in wifi_settings.py.py, please add them there!")
2020
raise
2121

2222
# PyPortal ESP32 Setup

examples/adafruit_io_simpletest_metadata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
# Import Adafruit IO REST Client
1414
from Adafruit_IO import RESTClient, AdafruitIO_RequestError
1515

16-
# Get wifi details and more from a esp32spi_settings.py file
16+
# Get wifi details and more from a wifi_settings.py.py file
1717
try:
18-
from esp32spi_settings import settings
18+
from wifi_settings.py import settings
1919
except ImportError:
20-
print("WiFi settings are kept in esp32spi_settings.py, please add them there!")
20+
print("WiFi settings are kept in wifi_settings.py.py, please add them there!")
2121
raise
2222

2323
# PyPortal ESP32 Setup

examples/adafruit_io_simpletest_temperature.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
# Import ADT7410 Library
2222
import adafruit_adt7410
2323

24-
# Get wifi details and more from a esp32spi_settings.py file
24+
# Get wifi details and more from a wifi_settings.py.py file
2525
try:
26-
from esp32spi_settings import settings
26+
from wifi_settings.py import settings
2727
except ImportError:
28-
print("WiFi settings are kept in esp32spi_settings.py, please add them there!")
28+
print("WiFi settings are kept in wifi_settings.py.py, please add them there!")
2929
raise
3030

3131
# PyPortal ESP32 Setup

0 commit comments

Comments
 (0)