Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. MicroPython
  3. SH1106

SH1106

NOASSERTIONPython

A MicroPython driver for SH1106 OLED displays, supporting SPI and I2C interfaces with framebuffer-based graphics.

GitHubGitHub
245 stars48 forks0 contributors

What is SH1106?

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.

Target Audience

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.

Value Proposition

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.

Overview

MicroPython driver for the SH1106 OLED controller

Use Cases

Best For

  • Adding a small OLED status screen to an ESP8266/ESP32 project
  • Displaying sensor data (temperature, humidity) on an embedded device
  • Building a MicroPython-based handheld game or gadget with a display
  • Creating a simple user interface for a microcontroller project
  • Prototyping with SH1106 OLEDs in educational or hobbyist settings
  • Displaying text and basic graphics in low-power embedded applications

Not Ideal For

  • Projects requiring dynamic switching between portrait and landscape orientations at runtime
  • Applications with strict memory constraints that cannot spare extra RAM for software rotation
  • Developers needing advanced graphics or animations beyond basic framebuffer operations
  • Systems using non-SH1106 OLED controllers or multiple display types

Pros & Cons

Pros

Flexible Communication Interfaces

Supports both SPI and I2C, allowing adaptation to different pin layouts and microcontroller capabilities, as shown in the detailed connection examples for ESP8266.

Seamless Framebuffer Integration

Mirrors all standard MicroPython framebuffer methods (like fill, text, rect), enabling familiar graphics programming without a steep learning curve.

Comprehensive Display Control

Includes functions for power management, contrast adjustment, and screen inversion, providing essential tools for optimizing display usage in embedded setups.

Enhanced Development Experience

Ships with .pyi type stubs for better autocomplete and type checking in IDEs like VS Code, reducing errors and improving productivity.

Cons

Rotation Performance Penalty

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.

Basic Font Support

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.

Hardware-Specific Design

Exclusively targets SH1106 displays, making it unsuitable for projects that may switch to other OLED controllers without significant code changes or additional drivers.

Frequently Asked Questions

Quick Stats

Stars245
Forks48
Contributors0
Open Issues3
Last commit1 year ago
CreatedSince 2017

Tags

#spi#embedded-systems#oled-display#micropython#i2c#microcontroller#embedded-graphics#framebuffer

Built With

M
MicroPython

Included in

MicroPython1.8k
Auto-fetched 1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub