1.12" oled


#1

I’m trying to get started with programming this display with python 3.
this program:

from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import sh1106
serial = i2c(port=1, address=0x3C)
device = sh1106(serial, width=128, height=128, rotate=2, mode=“1”)
with canvas(device) as draw:
draw.rectangle(device.bounding_box, outline=“white”, fill=“black”)
draw.text((10,40), “Hello World”, fill=“white”)

falls over on line 5 with the following error:
Traceback (most recent call last):
File “/home/pi/luma.examples/examples/tonyTest1.py”, line 5, in
device = sh1106(serial, width=128, height=128, rotate=2, mode=“1”)
File “/usr/local/lib/python3.5/dist-packages/luma/oled/device.py”, line 66, in init
“Unsupported display mode: {0} x {1}”.format(width, height))
luma.core.error.DeviceDisplayModeError: Unsupported display mode: 128 x 128

What should I put in the brackets on line 5?

If I leave out both the width and height the left hand half of the display lights up with random dots in the top left and bounding box and the end of “rld” displayed.

Suggestions most welcome.