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

ST7735 lib - Text mirror problem #157

Open
classic-audio opened this issue Nov 17, 2021 · 3 comments
Open

ST7735 lib - Text mirror problem #157

classic-audio opened this issue Nov 17, 2021 · 3 comments

Comments

@classic-audio
Copy link

Display: 80x160 color TFT display (driver ST7735S SPI )
Arduino: Arduino ProMini 3V3

I have downloaded the latest Adafruit-ST7735-Library yesterday.

The problem:
The text is displayed mirrowed (see pickture below)

The question: how can I correct that problem?

display

The test sketch:

#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>

Adafruit_ST7735 lcd = Adafruit_ST7735(9,10,8);
//--- LCD color def. --------------------------------
#define BLACK 0x000
#define BLUE 0x001F
#define GREEN 0x07E0
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
#define GREY 0x652F
#define RED 0xF800
#define OLIVE 0x7BE0
#define ORANGE 0xFD20

void setup(void){
// --- Display -----------------------------------
lcd.initR(INITR_MINI160x80);

lcd.invertDisplay(1);
lcd.setRotation(2);
lcd.fillScreen(BLACK);
}

void loop(){
lcd.setTextColor(GREEN);
lcd.setCursor(0,0);lcd.print("CLASSIC AUDIO");
lcd.setTextColor(RED);
lcd.setCursor(0,15);lcd.print("DESIGN");
lcd.setTextColor(YELLOW);
lcd.setCursor(0,25);lcd.print("Attenuator");
while(1);
}

@davidneosys
Copy link

hi,
did you solve that problem? I also had same problem. please share your modification.

@ideva-SAS
Copy link

hi

change ST77XX_MADCTL_MY 0x80 to 0x00 in Adafruit_ST77xx.h

@YonLiud
Copy link

YonLiud commented Jun 30, 2024

change ST77XX_MADCTL_MY 0x80 to 0x00 in Adafruit_ST77xx.h

I found an alternative solution. While your approach was correct, my display required flipping the image along the X-axis instead of the Y-axis. I assume this adjustment was also necessary for classic-audio.


#define ST77XX_MADCTL_MY 0x80
- #define ST77XX_MADCTL_MX 0x40
+ #define ST77X_MADCTL_MX 0x00
#define ST77XX_MADCTL_MV 0x20
#define ST77XX_MADCTL_ML 0x10
#define ST77XX_MADCTL_RGB 0x00

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

4 participants