A fast pure-C MicroPython driver for displays using the ST7789 chip, supporting ESP8266, ESP32, and STM32.
ST7789_mpy is a high-performance display driver for MicroPython that interfaces with ST7789-based LCD screens. It enables embedded developers to render graphics and text on low-cost displays commonly used in DIY electronics and IoT projects. The driver solves the problem of slow graphics rendering in pure Python by offering a fast, compiled C implementation.
Embedded systems developers and hobbyists working with MicroPython on microcontrollers like ESP8266, ESP32, or STM32 who need to add a display interface to their projects.
Developers choose ST7789_mpy for its significant performance gains over pure Python drivers, its support for multiple microcontroller platforms, and its optimized graphics primitives that make it ideal for real-time embedded applications.
Fast pure-C driver for MicroPython that can handle display modules on ST7789 chip
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written in pure C, it dramatically outperforms Python alternatives; e.g., line drawing on ESP8266 is 37.5x faster than st7789py_mpy, as shown in performance benchmarks.
Tested and documented for ESP8266, ESP32, and STM32, providing flexibility for various embedded projects, as evidenced by working examples in the README.
Includes optimized hline and vline methods that minimize SPI calls, speeding up common graphics operations, as detailed in the Methods section.
Blit_buffer function enables high-speed updates by copying byte arrays directly to display memory, useful for custom graphics or font rendering with helper functions.
Since it's a C module, users must compile their own MicroPython firmware, which adds setup complexity, requires build tools, and isn't plug-and-play.
Admitted in the README, drawing operations are significantly slower on ESP32 (47 ms vs 12 ms on ESP8266 for a line), making it less ideal for performance-sensitive ESP32 apps.
ESP32 has fixed SPI pin requirements (CLK:18, MOSI:23) and baudrate limits (max 40MHz); ESP8266 may need manual linker edits to avoid iram1_0_seg overflow.
Only officially supports 240x240 and 135x240 displays; other resolutions require non-trivial workarounds using xstart and ystart parameters, as noted in Troubleshooting.