Skip to content

MicroPython driver for SSD1327 128x128 4-bit greyscale OLED displays

License

Notifications You must be signed in to change notification settings

mcauser/micropython-ssd1327

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroPython SSD1327

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.

demo

Example

Copy the file to your device, using ampy, webrepl or compiling and deploying. eg.

$ ampy put ssd1327.py

Hello 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.

Parts

Connections

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

Links

License

Licensed under the MIT License.