lexus2k / ssd1306

Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms
MIT License
662 stars 127 forks source link

Rotate 180 degrees a SSD1306 oled on RPI #123

Closed jancotipsarevic closed 3 years ago

jancotipsarevic commented 3 years ago

Hello, I am starting using this amazing library, I am not an expert in cpp but a need to use it. This simple example works as expected but the board I am using has the oled physically rotated 180 degrees, so I need to rotate it but I dont know how to do it. I believe it is a matter of cpp knowledge. I need to overcome this issue to follow with my tests. I'd really appreciate your help.

Thank you very much.

int main(int argc, char **argv) { DisplaySSD1306_128x64_I2C display((int8_t) 5, { -1, 0x3D, -1, -1, 0 }); display.begin(); display.clear(); display.drawLine(10,10,50,10); display.setFixedFont(ssd1306xled_font6x8); display.printFixed (0, 8, "Line 1. Normal text", STYLE_NORMAL); cout << "Finished!, press any key to continue" << endl; cin.get(); return EXIT_SUCCESS; }