Skip to content

support SH1106 OLED displays #228

@jasonblewis

Description

@jasonblewis

Is it possible to support SH1106 OLED displays? The TTGO T-Eight board has one built into it.

If I try and use it by using the built in SD1306 driver, I get a few lines at the top of the screen and the rest of the screen looks like static.

It seems very similar to this issue, which might hold some clues as to how it could be supported:

rm-hull/luma.oled#1

photo 8-10-18 10 40 52 pm

Also see https://github.com/adamyoung600/WRX_HUD/tree/master/Hardware/SH1106

import machine, time
from ssd1306 import SSD1306_I2C

WIDTH = const(132)
HEIGHT = const (64)
sda_pin = 21
scl_pin = 22

i2c = machine.I2C(scl=scl_pin, sda=sda_pin, speed=400000)

ssd = SSD1306_I2C(WIDTH, HEIGHT, i2c)

import freesans20

from writer import Writer
wri2 = Writer(ssd, freesans20, verbose=True)

Writer.set_clip(True, True)

for y in range(0,HEIGHT-1):
    for x in range(0,WIDTH-1):
        Writer.set_textpos(x, y)
        wri2.printstring('{} {} MicroPython\nby LoBo\n10/2017'.format(x,y))

        ssd.show()
        time.sleep(1)
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions