Skip to content

Commit e5f9530

Browse files
committed
black
1 parent 98c94a2 commit e5f9530

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

examples/esp32spi/minimqtt_adafruitio_esp32spi.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
# with your WiFi credentials. Add your Adafruit IO username and key as well.
1717
# DO NOT share that file or commit it into Git or other source control.
1818

19-
aio_username = os.getenv('aio_username')
20-
aio_key = os.getenv('aio_key')
19+
aio_username = os.getenv("aio_username")
20+
aio_key = os.getenv("aio_key")
2121

2222
# If you are using a board with pre-defined ESP32 Pins:
2323
esp32_cs = DigitalInOut(board.ESP_CS)
@@ -55,6 +55,7 @@
5555

5656
### Code ###
5757

58+
5859
# Define callback methods which are called when events occur
5960
# pylint: disable=unused-argument, redefined-outer-name
6061
def connected(client, userdata, flags, rc):
@@ -78,7 +79,7 @@ def message(client, topic, message):
7879

7980
# Connect to WiFi
8081
print("Connecting to WiFi...")
81-
esp.connect_AP(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
82+
esp.connect_AP(os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD"))
8283
print("Connected!")
8384

8485
# Initialize MQTT interface with the esp interface

examples/native_networking/minimqtt_adafruitio_native_networking.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
# Set your Adafruit IO Username, Key and Port in settings.toml
1616
# (visit io.adafruit.com if you need to create an account,
1717
# or if you need your Adafruit IO key.)
18-
aio_username = os.getenv('aio_username')
19-
aio_key = os.getenv('aio_key')
20-
aio_port = os.getenv('port')
18+
aio_username = os.getenv("aio_username")
19+
aio_key = os.getenv("aio_key")
20+
aio_port = os.getenv("port")
2121

22-
print("Connecting to %s" % os.getenv('CIRCUITPY_WIFI_SSID'))
23-
wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD'))
24-
print("Connected to %s!" % os.getenv('CIRCUITPY_WIFI_SSID'))
22+
print("Connecting to %s" % os.getenv("CIRCUITPY_WIFI_SSID"))
23+
wifi.radio.connect(
24+
os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD")
25+
)
26+
print("Connected to %s!" % os.getenv("CIRCUITPY_WIFI_SSID"))
2527
### Feeds ###
2628

2729
# Setup a feed named 'photocell' for publishing to a feed
@@ -32,6 +34,7 @@
3234

3335
### Code ###
3436

37+
3538
# Define callback methods which are called when events occur
3639
# pylint: disable=unused-argument, redefined-outer-name
3740
def connected(client, userdata, flags, rc):

0 commit comments

Comments
 (0)