- Notifications
You must be signed in to change notification settings - Fork163
Python module to drive a SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106 OLED
License
rm-hull/luma.oled
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
luma.core|luma.docs|luma.emulator|luma.examples|luma.lcd|luma.led_matrix|luma.oled
Display drivers for SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SSD1362 / SH1106 / SH1107 / WS0010
Python 3 library interfacing OLED matrix displays with the SSD1306, SSD1309,SSD1322, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, SH1107 or WS0010 driver usingI2C/SPI/Parallel on the Raspberry Pi and other linux-based single-boardcomputers - it provides aPillow-compatibledrawing canvas, and other functionality to support:
- scrolling/panning capability,
- terminal-style printing,
- state management,
- color/greyscale (where supported),
- dithering to monochrome
Full documentation with installation instructions and examples can be found onhttps://luma-oled.readthedocs.io.
A list of tested devices can be found in thewiki.
The display pictured below is a SSD1306 (128 x 64 pixels), and the board is tiny enough to fitinside the RPi case.
As well as display drivers for various physical OLED devices, there areemulators that run in real-time (with pygame) and others that can takescreenshots, or assemble animated GIFs, as per the examples below (source codefor these is available in theluma.examplesgit repository:
Version 2.0.0 was released on 11 January 2017: this came with a rename of thegithub project fromssd1306 toluma.oled to reflect the changing natureof the codebase.
Some core functionality has been moved out to another git repository,luma.core: this has enabledanother project to have a facelift:pcd8544 has now been reborn asluma.lcd: the same API can now beused across both projects. Likewisemax7219 has been renamed toluma.led_matrix soit can also take advantage of the common API.
The consequence is that any existing code that uses the oldssd1306 packagewill need to be updated. The changes should be limited to altering importstatements only, and are described in theupgrade documentation.
The MIT License (MIT)
Copyright (c) 2014-2023 Richard Hull and contributors
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
About
Python module to drive a SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106 OLED