This repository contains Micropython code for the LilyGO®️ T-Display S3 microcontroller, designed as a clock and 3D printer status monitor. It connects to a Klipper-controlled printer via the Moonraker API to check if the printer is on and display print progress if a job is active. Written entirely in Micropython, it offers a simple and effective way to monitor your 3D printer.
LilyGO.T-Display.S3.mp4
First, clone this repository:
git clone https://github.com/julioformiga/t-display-clock-3d-printerLearn about and download the Micropython firmware with the embedded ST7789 driver from this repo:
https://github.com/russhughes/st7789s3_mpy
Download the firmware
wget https://github.com/russhughes/st7789s3_mpy/raw/main/firmware/firmware.binI personally used the PDM package manager primarily to install esptool and mpremote.
With PDM installed, simply run:
pdm install
eval $(pdm venv activate)Or with pipx:
pipx install esptool mpremoteWith the programs installed, the firmware.bin in your .firmware/ folder, and the T-Display connected via USB in boot mode, run the command to erase the flash:
esptool.py --port /dev/ttyACM0 erase_flashesptool.py --port /dev/ttyACM0 write_flash 0 firmware/firmware.binNote1: change /dev/ttyACM0 for your USB device
Note2: It is recommended to use ... write_flash 0x1000 firmware/firmware.bin, but this didn't work for me.
Edit the data in .src/config.py:
HOSTNAME = "ESP32-TDisplay"
IP_3D_PRINTER = "xxx.xxx.xxx.xxx"
WIFI_SSID = "YOUR-SSID"
WIFI_PASS = "YOUR-PASS"To upload the files to the T-Display S3 device, run the setup.sh script:
source setup.shIt is unlikely to work with just these instructions due to different environments and operating systems.
If you encounter any difficulties, feel free to open an issue or get in touch.