1.12" Mono OLED i2c Breakout – no Micro Python driver?

Just bought the 1.12" Mono OLED (128x128, white/black) Breakout – I2C
1.12" Mono OLED (128x128, white/black) Breakout – I2C (pimoroni.com)
There is no Micro Python driver on Pimoroni’s Micro Python github page?

Anybody have a working sh1107 Micro Python Library? I having a very hard time getting the ones I have found online to work?

I think you might be able to drive this one with PicoGraphics - it’s on the ‘supported display’ list anyway DISPLAY_I2C_OLED_128X128

Let me know if it works and I’ll update the shop page to say it’s Pico compatible :)

1 Like

Thank you very much, I was not aware of that bit of info. There weren’t any Micro python examples for it, so I just assumed it hadn’t been ported over to Micro python yet.
This got me Hello World

Is that the correct way to set the pen, as this display only has the one color?

from picographics import PicoGraphics, DISPLAY_I2C_OLED_128X128

from pimoroni_i2c import PimoroniI2C

i2cbus = PimoroniI2C(4, 5)

display = PicoGraphics(display=DISPLAY_I2C_OLED_128X128, bus=i2cbus)
display.clear()
display.set_font("bitmap8")
display.set_pen(15)  # White

display.text("Hello World", 0, 0, scale=2)

display.update()

Hoorah!

I reckon so, I think that’s how the other displays that use PEN_1BIT work. It might try and dither the black and white if you use set_pen with numbers in between 1 and 14, like Inky Pack / Badger?

1 Like

It’s working, just seemed weird entering (15) instead of (255, 255, 255).
Works with my Pico Breakout Garden and my Pico W Explorer. Does not want to work with my Pico Inventor, the device I bought it for? All, as far as I know are running 120.6.
I’ll flash nuke it reflash it and have another go in a bit. Need to take a little break first.
Thanks for pointing me in the right direction. =)

Fabbed up a custom 4 socket i2c attachment board that plugs into the QWICC connector. And plugged that into my Pico W Explorer. Then played with the code a little.

from picographics import PicoGraphics, DISPLAY_I2C_OLED_128X128

from pimoroni_i2c import PimoroniI2C

i2cbus = PimoroniI2C(20, 21)

display = PicoGraphics(display=DISPLAY_I2C_OLED_128X128, bus=i2cbus)
display.clear()
display.set_font("bitmap8")
display.set_pen(15)  # White

display.text("Pimoroni", 25, 0, scale=2)
display.text("128 x 128", 25, 20, scale=2)
display.text("i2c OLED", 25, 40, scale=2)
display.text("On A", 40, 60, scale=2)
display.text("Pico W", 35, 80, scale=2)
display.text("Explorer", 25, 100, scale=2)


display.update()
1 Like