Use secrets import from other examples

This commit is contained in:
Scott Shawcroft 2020-07-06 15:12:19 -07:00 committed by GitHub
parent 93b17712e7
commit 15f2a45a5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
# SPDX-FileCopyrightText: 2019 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
from secrets import secrets
import board
import busio
from digitalio import DigitalInOut
@ -9,6 +8,13 @@ import adafruit_esp32spi.adafruit_esp32spi_socket as socket
from adafruit_esp32spi import adafruit_esp32spi
import adafruit_requests as requests
# Get wifi details and more from a secrets.py file
try:
from secrets import secrets
except ImportError:
print("WiFi secrets are kept in secrets.py, please add them there!")
raise
print("ESP32 SPI webclient test")
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"