Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/rm-hull/luma.oled/llms.txt

Use this file to discover all available pages before exploring further.

Luma OLED is a Python 3 library that provides display drivers for a wide range of OLED controllers, enabling you to draw text, shapes, and images on OLED screens connected to a Raspberry Pi or other Linux-based single-board computers (SBCs). It integrates seamlessly with the Pillow (PIL) imaging library, giving you a familiar drawing API with no extra learning curve.

Get started

Learn what luma.oled does and which controllers it supports

Installation

Install the library and set up your Python environment

Quickstart

Connect your OLED display and display your first image

Hardware setup

Wire up your display over I2C, SPI, or parallel bus

Why luma.oled?

Luma OLED handles the low-level initialization sequences, memory mapping, and display refresh logic for each supported chipset so you can focus on what to show on screen, not how to talk to the hardware.

15+ chipsets supported

SSD1305, SSD1306, SSD1309, SSD1322, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, and more

Three interface types

I2C, SPI, and 6800-style parallel bus interfaces all supported

Pillow-compatible canvas

Draw rectangles, text, and images using the familiar Pillow API

Color and greyscale

Monochrome, 4-bit greyscale, and full 16-bit RGB color displays

Quick example

from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import ssd1306

serial = i2c(port=1, address=0x3C)
device = ssd1306(serial)

with canvas(device) as draw:
    draw.rectangle(device.bounding_box, outline="white", fill="black")
    draw.text((30, 40), "Hello World", fill="white")

Explore the docs

Drawing guide

Render text, shapes, and images using the canvas API

Device reference

Full parameter reference for every supported device class

Troubleshooting

Diagnose corrupted displays, wiring issues, and common errors

Upgrade guide

Migrate from older versions or from the legacy ssd1306 package

Build docs developers (and LLMs) love