File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111from adafruit_bitmap_font import bitmap_font
1212from adafruit_display_text .label import Label
1313from adafruit_io .adafruit_io import IO_MQTT
14- from adafruit_minimqtt import MQTT
14+ import adafruit_minimqtt as MQTT
1515from adafruit_pyportal import PyPortal
1616from adafruit_seesaw .seesaw import Seesaw
1717from simpleio import map_range
181181 continue
182182print ("Connected to WiFi!" )
183183
184- # Initialize a new MiniMQTT Client object
185- mqtt_client = MQTT (
186- socket = socket ,
187- broker = "io.adafruit.com" ,
188- username = secrets ["aio_username" ],
189- password = secrets ["aio_key" ],
190- network_manager = wifi
191- )
184+ # Initialize MQTT interface with the esp interface
185+ MQTT .set_socket (socket , esp )
186+
187+ # Initialize a new MQTT Client object
188+ mqtt_client = MQTT .MQTT (broker = "https://io.adafruit.com" ,
189+ username = secrets ["aio_user" ],
190+ password = secrets ["aio_key" ])
192191
193192# Adafruit IO Callback Methods
194193# pylint: disable=unused-argument
You can’t perform that action at this time.
0 commit comments