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.

Interface classes act as the communication layer between luma.oled device drivers and physical hardware. Each interface wraps the underlying bus protocol and exposes a uniform command() and data() API consumed by all device classes. The interfaces themselves live in luma.core rather than luma.oled, so they are shared across the entire luma ecosystem.
All interface classes shown here are provided by the luma.core package (luma.core.interface.serial and luma.core.interface.parallel), not by luma.oled itself. Install luma.core>=2.4.1 to use them.
The I2C interface connects to an OLED display over the two-wire I2C bus. This is the simplest setup and requires no chip-select or data/command pin. Most SSD1306, SH1106, and similar displays default to I2C address 0x3C.
port
int
default:"1"
The I2C bus number. Use port=0 on original Raspberry Pi rev.1 boards; port=1 on all others.
address
int
default:"0x3C"
The 7-bit I2C address of the display. Common values are 0x3C and 0x3D.
from luma.core.interface.serial import i2c
from luma.oled.device import ssd1306

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

Build docs developers (and LLMs) love