OctoPrint is an incredibly popular and capable open-source project created and maintained by Gina Häußge. It allows you to remotely monitor and control your 3D printer. Traditionally you can check your OctoPrint status via a browser, but what if you wanted to get a quick status check without switching tabs?
This project uses Adafruit IO as an MQTT broker for OctoPrint and CircuitPython, running on a Feather ESP32-S2 Reverse TFT. OctoPrint sends MQTT messages to Adafruit IO as individual feeds with the OctoPrint MQTT plugin. The Feather checks the Adafruit IO feeds for new messages and updates the display accordingly, letting you see what's happening with your printer at your desk, coffee table, etc.
The Feather can also send messages to OctoPrint using the OctoPrint REST API, enabled with the OctoPrint MQTT Subscribe plugin. You'll ping Adafruit IO feeds with the buttons on the Feather to trigger commands in OctoPrint such as pausing or canceling a print.
The TFT display on the Feather will show the current status of your printer according to OctoPrint alongside the OctoPrint mascot. For additional visualization, the onboard NeoPixel will show the rainbow animation during a print and blink a corresponding color for status states.
The D0, D1 and D2 buttons can send REST API commands via Adafruit IO to OctoPrint. Their functionality is shown on the TFT and varies depending on if your printer is printing or not.
If your printer is idle, you can set the hotend temperature to 0 (cooldown), set the hotend temperature to 200 (heat up) or reboot your OctoPrint server. If you are printing, you can pause, resume or cancel your print.
This project assumes that you are already running an OctoPrint instance. It will not work unless you have OctoPrint running since it works in tandem with OctoPrint using the MQTT and MQTT Subscribe plugins. OctoPrint has many resources available to guide you through the setup and installation.
Additionally, you will need an Adafruit IO account since Adafruit IO is acting as the MQTT broker, logging the MQTT messages from OctoPrint in IO feeds to be accessed by the Feather and sending REST commands to OctoPrint. There are guides on the Learn System, linked here and below, to assist you with this.