Open sticilface opened 7 years ago
No. It would require a second set of fonts of remapping the bits in each byte of the existing font which would be slow.
I would say yes, at least on my OLED 0.96" I2C-only. After normal initialization using Adafruit128x64, I send another two commands as I have my OLED rotated with the pins at bottom ` // Initialize dev from command table, turned on an cleared lcd.begin(&Adafruit128x64, I2C_ADDRESS);
// Rotate display 180 degrees, connection pins at bottom lcd.ssd1306WriteCmd(SSD1306_SEGREMAP); // colAddr 0 mapped to SEG0 (RESET) lcd.ssd1306WriteCmd(SSD1306_COMSCANINC); // Scan from COM0 to COM[N –1], normal (RESET) `
In the library switch the values of COMSCANINC and COMSCANDEC. Like so: COMSCANINC = 0xc0 COMSCANDEC = 0xc8
This worked for me. I am using 128x32 SSD1306 Oled.
You need to adjust 2 parameters in SSD1306init.h file under Adafruit 128x32.
From
SSD1306_SEGREMAP | 0x1, SSD1306_COMSCANDEC,
To
SSD1306_SEGREMAP | 0x0, SSD1306_COMSCANINC,
This fill flip the screen by 180 degrees. Hopes this works for you too.
I added void displayRemap(bool mode)
to select normal or remap mode.
See the DisplayRotationSpi and DisplayRotationWire examples.
Is it possible to rotate the screen. i.e. have it 180 degrees?