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

Flipping and reverse #34

Open
ezkimos opened this issue Feb 23, 2021 · 1 comment
Open

Flipping and reverse #34

ezkimos opened this issue Feb 23, 2021 · 1 comment
Labels
answered question Further information is requested

Comments

@ezkimos
Copy link

ezkimos commented Feb 23, 2021

Hi! I have two ips displays of size 1.14 and 1.8 on the st7789 and st7735 controllers. I also use your libraries for controllers. For use in an optical system, it is necessary to flip/reverse the image horizontally. Please help me where and how to edit the library. I found information only about rotation in 4 positions.

@Bodmer
Copy link
Owner

Bodmer commented Feb 25, 2021

You need to send a command to the TFT MADCTL register 0x36
As an example for the ST7735, the bits are defined here. The command and bit functions in the driver data sheets.

In summary the MX, MV, MH, MV are the mirror x,y,horizontal and vertical flip bits. The bits you change will be dependant on the screen rotation you use. You can send the flip command from the sketch of change the library driver rotation code for each display type you use. Here is the rotation code for the ST7735, showing the default state of the bit settings.

@Bodmer Bodmer added answered question Further information is requested labels Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants