2
\$\begingroup\$

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):

OLED 128x64 0.96 inch

What I want to do is:

Diagram of flipping the image

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?

Thanks in advance!

\$\endgroup\$
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Roger Rowland Dec 8 '16 at 10:42
  • \$\begingroup\$ 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. \$\endgroup\$ – Russell McMahon Dec 8 '16 at 10:53
  • \$\begingroup\$ 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 \$\endgroup\$ – crowie Dec 8 '16 at 13:38
  • \$\begingroup\$ RTFM for screen rotation and update direction commands to have it display in any orientation. \$\endgroup\$ – Majenko Dec 8 '16 at 14:57
  • \$\begingroup\$ Mount it upside down? \$\endgroup\$ – winny Mar 10 '17 at 9:10
4
\$\begingroup\$

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)

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

With the SSD1306.h Arduino package, simply add

display.flipScreenVertically();

after your call to display.init()

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.