rm-hull / luma.oled

Python module to drive a SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106 OLED
https://luma-oled.readthedocs.io
MIT License
811 stars 163 forks source link

Adding support for 128x96 (1.27") Adafruit ssd1351 #290

Closed gh123man closed 4 years ago

gh123man commented 4 years ago

Raspberry Pi Zero W

Linux Kernel version

Linux raspberrypi 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux

Expected behaviour

Display should function with the ssd1351 driver

Actual behaviour

Nothing.

Details

I am trying to get luma.oled working for this device It seems like there is good support for the 128x128 variant however even after adding the 128x96 resolution here the screen does not respond.

I have tested this screen with the Adafruit reference library so I am confident everything is wired correctly and am able to talk to the device. The device specific parameters can be found here I also noticed some minor differences in the init process. I attempted to replicate the exact init sequence in luma.oled but with no luck.

This all is rather new to me. I am happy to author support for this screen, but I am looking for some pointers on where I may be going wrong and how to further diagnose this.

gh123man commented 4 years ago

I spoke too soon. issue was the GPIO pin placement and the defaults this library uses (learned from this thread https://github.com/rm-hull/luma.oled/issues/205)

I have the display working with a v-offset of 32. I can post a PR with the new resolution support. One question: Should this offset be calculated based on the resolution? as in - when using 128x96, should the luma device code automatically apply this offset or should we expect the user to figure this out?

thijstriemstra commented 4 years ago

I can post a PR with the new resolution support.

Pleaso do, we can discuss approach there.

gh123man commented 4 years ago

Done. see: https://github.com/rm-hull/luma.oled/pull/291