A MicroPython library for SSD1327 128x128 4-bit greyscale OLED displays, over I2C.
For example, the Grove - OLED Display 1.12" which features a 96x96 display.
Copy the file to your device, using ampy, webrepl or compiling and deploying. eg.
$ ampy put ssd1327.pyHello World
import ssd1327
# using Software I2C
from machine import SoftI2C, Pin
i2c = SoftI2C(sda=Pin(21), scl=Pin(22)) # TinyPICO
# i2c = SoftI2C(sda=Pin(0), scl=Pin(1)) # Raspberry Pi Pico
# i2c = SoftI2C(sda=Pin(4), scl=Pin(5)) # WeMos D1 Mini
# or using Hardware I2C
from machine import I2C, Pin
i2c = I2C(0) # TinyPICO sda=19, scl=18
display = ssd1327.SEEED_OLED_96X96(i2c)  # Grove OLED Display
# display = ssd1327.SSD1327_I2C(128, 128, i2c)  # WaveShare, Zio Qwiic
display.text('Hello World', 0, 0, 255)
display.show()
display.fill(0)
for y in range(0,12):
    display.text('Hello World', 0, y * 8, 15 - y)
display.show()See /examples for more.
- Grove OLED Display 1.12"
 - Zio Qwiic OLED Display (1.5inch, 128x128)
 - TinyPICO
 - Raspberry Pi Pico
 - WeMos D1 Mini
 - Grove Male Jumper Cable
 
| TinyPICO ESP32 | Grove OLED | 
|---|---|
| GPIO22 (SCL) | SCL | 
| GPIO21 (SDA) | SDA | 
| 3V3 | VCC | 
| GND | GND | 
| Raspberry Pi Pico | Grove OLED | 
|---|---|
| GPIO1 (I2C0_SCL) | SCL | 
| GPIO0 (I2C0_SDA) | SDA | 
| 3V3 | VCC | 
| GND | GND | 
| WeMos D1 Mini | Grove OLED | 
|---|---|
| D1 (GPIO5) | SCL | 
| D2 (GPIO4) | SDA | 
| 3V3 (or 5V) | VCC | 
| G | GND | 
Licensed under the MIT License.
