File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2222* `Monochrome 128x32 SPI OLED graphic display <https://www.adafruit.com/product/661>`_
2323* `Adafruit FeatherWing OLED - 128x32 OLED <https://www.adafruit.com/product/2900>`_
2424* Monochrome 0.49" 64x32 I2C OLED graphic display
25+ * Monochrome 0.66" 64x48 I2C OLED graphic display (eg https://www.amazon.com/gp/product/B07QF7QK6P)
2526* Might work on other sub-128 width display: Dots 72x40, 64x48, 96x16
2627
2728**Software and Dependencies:**
@@ -87,12 +88,15 @@ def __init__(
8788 col_offset = (
8889 0 if width == 128 else (128 - width ) // 2
8990 ) # https://github.com/micropython/micropython/pull/7411
91+ row_offset = (
92+ col_offset if (kwargs ["height" ] != 48 or kwargs ["width" ] != 64 ) else 0
93+ ) # fix for 0.66" 64x48 OLED
9094 super ().__init__ (
9195 bus ,
9296 init_sequence ,
9397 ** kwargs ,
9498 colstart = col_offset ,
95- rowstart = col_offset ,
99+ rowstart = row_offset ,
96100 color_depth = 1 ,
97101 grayscale = True ,
98102 pixels_in_byte_share_row = False ,
You can’t perform that action at this time.
0 commit comments