Skip to content

Commit e935e6c

Browse files
committed
fix compatibility
1 parent 4c6817c commit e935e6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_ssd1306.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ def init_display(self):
9595
SET_MEM_ADDR, 0x00, # horizontal
9696
# resolution and layout
9797
SET_DISP_START_LINE | 0x00,
98-
SET_SEG_REMAP | 0x00, # column addr 127 mapped to SEG0
98+
SET_SEG_REMAP | 0x01, # column addr 127 mapped to SEG0
9999
SET_MUX_RATIO, self.height - 1,
100100
SET_COM_OUT_DIR | 0x08, # scan from COM[N] to COM0
101101
SET_DISP_OFFSET, 0x00,
102102
SET_COM_PIN_CFG, 0x02 if self.height == 32 or self.height == 16 else 0x12,
103103
# timing and driving scheme
104104
SET_DISP_CLK_DIV, 0x80,
105-
SET_PRECHARGE, 0x22 if self.external_vcc else 0x22,
105+
SET_PRECHARGE, 0x22 if self.external_vcc else 0xf1,
106106
SET_VCOM_DESEL, 0x30, # 0.83*Vcc
107107
# display
108108
SET_CONTRAST, 0xff, # maximum

0 commit comments

Comments
 (0)