Skip to content

Commit

Permalink
Call wifi.connect() after wifi.reset()
Browse files Browse the repository at this point in the history
Need to explicitly call connect method after reset when WiFi manager is used with MQTT.
adafruit/Adafruit_CircuitPython_ESP32SPI#100
  • Loading branch information
aerialist authored Jul 10, 2021
1 parent 5efcef4 commit 5d687cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/adafruit_io_mqtt/adafruit_io_pubsub_rp2040.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def on_led_msg(client, topic, message):
except (ValueError, RuntimeError) as e:
print("Failed to get data, retrying\n", e)
wifi.reset()
wifi.connect()
io.reconnect()
continue
# Send a new temperature reading to IO every 30 seconds
Expand Down

0 comments on commit 5d687cb

Please sign in to comment.