MQTT devices, like your CircuitPython board, connect to a broker with a client library.
We've written an awesome CircuitPython MQTT client library called Adafruit MiniMQTT.
This library is based off previous work by pfalcon on uMQTT (and the umqtt port to ESP32SPI by beachbc). MiniMQTT's primary difference from MicroPython's uMQTT library is its use of calling conventions and method names similar to The Eclipse Foundation's Paho.Mqtt.Python.
We've written MiniMQTT as a protocol implementation - it doesn't have a hardware dependency for network connections. At this time, the MiniMQTT library is only available for CircuitPython devices connected over WiFi. Ethernet and cellular connectivity is not supported (yet! no ETA).
Some CircuitPython compatible boards come with CircuitPython installed. Others are CircuitPython-ready, but need to have it installed. As well, you may want to update the version of CircuitPython already installed on your board. The steps are the same for installing and updating.
- To install (or update) your CircuitPython board, follow this page and come back here when you've successfully installed (or updated) CircuitPython.
To interface your AirLift breakout/board with and the internet - you'll need to install a few CircuitPython libraries on your board.
First make sure you are running the latest version of Adafruit CircuitPython for your board.
Next you'll need to install the necessary libraries to use the hardware--carefully follow the steps to find and install these libraries from Adafruit's CircuitPython library bundle matching your version of CircuitPython.
CircuitPython hardware shows up on your computer operating system as a flash drive when connected via usb. The flash drive is called CIRCUITPY and contains a number of files. You will need to add additional files to enable the features of this project.
First, create a folder on the drive named lib if it is not already there.
Ensure your board's lib folder has the following files and folders copied over. The version of the files must be the same major version as your version of CircuitPython (i.e. 4.x for 4.x, 5.x for 5.x, etc.)
Once you have CircuitPython setup and libraries installed, you can get your project connected to the Internet over WiFi.
To do this, you'll be editing CircuitPython code and will need an editor. We suggest using Mu, a lightweight text editor with support for CircuitPython built-in.
Click the button below to get instructions on how to install the Mu Editor.
If you have not yet connected your CircuitPython WiFi board to the Internet, follow one of the guides below and come back when you've successfully connected to the internet: