Rotate OLED (SSD1306) 90 degrees

Hi!

Hi have anyone succeeded with 90 degrees rotation of a SSD1306 OLED? 180 flip can be done using

oled.sendCommand(((0xa1) >> 8) | 0xc8);

But have no idea of the command to just to it 90, and Google seems to not be my friend in this either.

Thanks!

There appears to be no command to rotate the display. You will have to draw everything sideways.

Note:

oled.sendCommand(((0xa1) >> 8) | 0xc8);

This line looks wrong. Any 8-bit value shifted right by 8 bits results in ZERO. The line is therefore equivalent to:

oled.sendCommand(0xc8);