CircuitPython Setup

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

MiniMQTT and Ethernet

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).

Install CircuitPython

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. 

CircuitPython Library Installation

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.)

  • adafruit_minimqtt
  • adafruit_logger
  • adafruit_esp32spi
  • adafruit_bus_device 
  • neopixel.mpy

WiFi - Internet Connect!

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:

This guide was first published on Jul 23, 2019. It was last updated on Jul 23, 2019. This page (CircuitPython Setup) was last updated on Oct 22, 2019.