Closed
Description
This chip has a slightly larger memory buffer per row than the SH1107 (132 vs 128), so currently the display is shifted and also draws a white line on the right-hand side.
NOTE This is running the modified driver from #19
Code running in picture:
import time, board, displayio, i2cdisplaybus, terminalio
import adafruit_displayio_sh1106
# Select one to run
from adafruit_display_text import bitmap_label as label
# from adafruit_display_text import label as label
displayio.release_displays()
dw,dh = 128, 64
i2c = board.STEMMA_I2C()
display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C)
display = adafruit_displayio_sh1106.SH1106(display_bus, width=dw, height=dh)
display.wake()
maingroup = displayio.Group()
display.root_group = maingroup
text1 = label.Label(terminalio.FONT, text="helloworld...")
text1.anchor_point = (0.0, 0.0)
text1.anchored_position = (0, 0)
text2 = label.Label(terminalio.FONT, text="@edgjr ")
text2.anchor_point = (0.0, 0.0)
text2.anchored_position = (0, dh / 2)
for t in (text1, text2):
maingroup.append(t)
while True:
try:
text2.text = "%.1f" % time.monotonic()
time.sleep(0.1)
except KeyboardInterrupt:
break
display.sleep()
Metadata
Metadata
Assignees
Labels
No labels