lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
377 stars 52 forks source link

how to rotate the screen with SSD1306/I2C #46

Closed pkerspe closed 3 years ago

pkerspe commented 3 years ago

Sweet little library and especially the speed oposed to overloaded ones like the adafruit one.

Just wondering how one could rotate the screen (flip vertically and horizontally) using this library? Is there any documentation of all exposed functions once can use on the display instance? This library would be perfect if there was some more documentation available on the different functions

lexus2k commented 3 years ago

Hi Paul,

There is no way rotate by 90 degrees. But you can flip horizontally or vertically:

display.getInterface().flipVertical( 0 or 1 );
display.getInterface().flipHorizontal( 0 or 1 )

Best regards.

lexus2k commented 3 years ago

This library would be perfect if there was some more documentation available on the different functions

documentation is automatically generated from the code by doxygen. Unfortunately, I don't have much time to write much docs, but examples can be a good start point to understand the library.

Here is a link to the functions in the documentation, you're looking for

pkerspe commented 3 years ago

Thanks a lot Aleksei for the quick response. The hint about using "getInterface" was my missing link :-) I noticed the two functions in the interface but did not know how to actually get the access to interface. Problem solved now, thanks! One example showing this function would probably help future users. I did not find an example for this at least, bit now I know it anyway :-)

lexus2k commented 3 years ago

I agree.

The idea of the library architecture: all common functions for all displays are available via display. object. While some displays have hardware acceleration or specific functions. Those ones are available via display.getInterface(). object