How to change ST7735 display to create a mirror image #1924
Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
-
The TFT_MADCTL in initialised during init(), the init value will depend on the tab colour option you have set in the setup file. The TFT_MADCTL bits are also changed in a rotation so that code can be modified or used to determine the MADCTL values for a particular display, for example: The MX and MY (mirror X, mirror Y in portrait orientation)) bits are the ones to try. The MV (mirror Vertical) changes the refresh direction thus has the same effect as MY. |
Beta Was this translation helpful? Give feedback.
-
I might be a bit late to the discussion, but I was facing a similar issue with my ST7735 display. My display is likely a GreenTab variant (the screen protector was green, and it worked, so I'm not entirely sure). After some troubleshooting, I found a solution. In the #define TFT_MADCTL 0x36
#define TFT_MAD_MY 0x80
- #define TFT_MAD_MX 0x40
+ #define TFT_MAD_MX 0x00
#define TFT_MAD_MV 0x20
[...] I'm using a vertical configuration. For anyone needing to mirror the display horizontally, the change would be: #define TFT_MADCTL 0x36
- #define TFT_MAD_MY 0x80
+ #define TFT_MAD_MY 0x00
#define TFT_MAD_MX 0x40
#define TFT_MAD_MV 0x20
[...] Here's an image of my working setup: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I am having an issue and I am looking for some help. I'm in the process of making a pair of ESP32 based smartglasses and I need to get my ST7355 to mirror text to make it readable through my prism optics. I have gone into the drivers for the display and according to the datasheet for this display I need to change MADCTL from 0x37 to 0x56 (Basically change the binary from 00110110 to 01010110 as the first three digits should set the display orientation). When I make this change to the source code, I am getting the display colored set to gold, but no mirroring of the display is visible. Any ideas on why this isn't working or a better way of achieving what I am attempting? Btw I absolutely love this library and I have used it for so many projects and I really appreciate all the work that has gone into making this available for the the community!

Beta Was this translation helpful? Give feedback.
All reactions