Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't rotate display #10

Open
buteomont opened this issue May 5, 2021 · 2 comments
Open

Can't rotate display #10

buteomont opened this issue May 5, 2021 · 2 comments

Comments

@buteomont
Copy link

I chose this library because of its small footprint and simple interfaces. Everything in my project works great except I need to be able to rotate the display 180 degrees. I believe the SSD1306 chip has the hardware capability for this, but I don't know how to do it. I imagine it would be a simple addition to the otherwise excellent library for someone that knows how to do it.

@buteomont
Copy link
Author

Ok, I actually figured out how to do this. In oled.cpp lines 248 and 249 I changed
i2c_send(0xA1); // segment remapping mode
i2c_send(0xC8); // COM output scan direction
to
i2c_send(0xA0); // segment remapping mode
i2c_send(0xC0); // COM output scan direction

Perhaps overloading function begin() with begin(boolean rotate180)?

@durydevelop
Copy link
Owner

Thank for add-on suggestion, will put it in next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants