A MicroPython driver for SH1106 OLED displays, supporting SPI and I2C interfaces with framebuffer-based graphics.
SH1106 is a MicroPython driver library for controlling SH1106-based OLED displays. It provides a Pythonic interface to draw graphics, render text, and manage display settings (like contrast and power) on small OLED screens commonly used in embedded projects. It solves the problem of interfacing with SH1106 hardware from MicroPython code, abstracting low-level communication details.
Embedded developers and hobbyists using MicroPython on platforms like ESP8266, ESP32, or other microcontrollers who need to add a small OLED display to their projects.
Developers choose this driver because it's a dedicated, community-tested solution for SH1106 displays in the MicroPython ecosystem. It offers a straightforward API aligned with MicroPython's framebuffer module, supports both SPI and I2C, and includes practical features like rotation and IDE type stubs out of the box.
MicroPython driver for the SH1106 OLED controller
Supports both SPI and I2C, allowing adaptation to different pin layouts and microcontroller capabilities, as shown in the detailed connection examples for ESP8266.
Mirrors all standard MicroPython framebuffer methods (like fill, text, rect), enabling familiar graphics programming without a steep learning curve.
Includes functions for power management, contrast adjustment, and screen inversion, providing essential tools for optimizing display usage in embedded setups.
Ships with .pyi type stubs for better autocomplete and type checking in IDEs like VS Code, reducing errors and improving productivity.
Software rotation for 90° and 270° requires an additional framebuffer, increasing RAM usage by width*height/8 bytes and slowing down show() calls by about 33%, as explicitly admitted in the README.
Limited to the built-in 8x8 ASCII font; for custom fonts, developers must integrate external libraries like micropython-font-to-py, adding setup complexity and dependency management.
Exclusively targets SH1106 displays, making it unsuitable for projects that may switch to other OLED controllers without significant code changes or additional drivers.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.