# Flip the image of OLED 128x64 0.96 inch display

I am looking for a method to flip the image of an OLED 128x64 0.96 inch (with SSD1306 driver) display. It is the one I have with 4 pins only (image found on Internet):

What I want to do is:

Are there any currently possible ways to do this with an Arduino?

I saw on different forums that people are flipping their displays because of a library problem. Can I do that intentionally to achieve it?

I thought I could get every single pixel and position it again, but it would take up so much ram. If that is the only solution, could you please tell me how can I get the pixel, whether it is on or not, from Arduino?

• The display has no built-in fonts. If you want to mirror the font, just change the code you must already have that maps the ASCII characters to bitmaps of the text. Alternatively, look at the datasheet for the SSD1306 and see if there is a command to mirror the display. – Roger Rowland Dec 8 '16 at 10:42
• More data neededon how you drive these. Do you produce the whole image in the uC and output it or ? | If you effectively have the image as a bit map or can generate it as if it is one then sending the lines of data in reverse order will do what you want. | If you have the ability to write a line of pixels to line(xxx) then writing it to line (line_numbermax - original_line_number +1) will do what you want. | You should provide links for display & driver and enough detai on how you are generating and transferring data to the display to make it unambiguously clear. – Russell McMahon Dec 8 '16 at 10:53
• You need to provide more details on what your setup is. What Arduino are you using? That said I have a bunch of link Microview units that use the same driver chip but a smaller display (64x48) the Arduino library was written for Uno compatible uC you could adapt it easily for a larger screen – crowie Dec 8 '16 at 13:38
• RTFM for screen rotation and update direction commands to have it display in any orientation. – Majenko Dec 8 '16 at 14:57
• Mount it upside down? – winny Mar 10 '17 at 9:10

SSD1306 support display flipping (mirroring) - need only change in initialization: COMSCANDEC to COMSCANINC or vice verasa.

COMSCANINC = 0xc0
COMSCANDEC = 0xc8


More info in datasheet and section: 10.1.14 Set COM Output Scan Direction (C0h/C8h)

How to change what you are doing to what you want to do is qute possibly quite easy.
BUT until you tell us what you are actually doing to get change image description to dispolay data and to output it we cannot be certain that any solution is correct.

You should provide links for display & driver and enough detail on how you are generating and transferring data to the display to make it unambiguously clear.

More data needed on how you drive these. Do you produce the whole image in the uC and output it or ?

Solutions that may work depending on what your undisclosed method actually is.

(1) If you effectively have the image as a bit map or can generate it as if it is one then sending the lines of data in reverse order will do what you want.
ir send last line 1st, then 2nd to last, then 3rd to last ...

(2) If you have the ability to write a line of pixels to line(xxx)
then writing it to line (line_numbermax - xxx +1) will do what you want.
eg in a 9 line display
line 1 maps to 9-1+1 = 9
line 9 maps to 9-9+1 = 1
line 3 maps to 9 - 3 +1 = 7
QED.

With the SSD1306.h Arduino package, simply add

display.flipScreenVertically();