Hi there
I have an issue with my waveshare display (https://www.waveshare.com/2.8inch-resistive-touch-lcd.htm)
So it has a ST7789D display driver, so I use the AdafruitST77XX Library (Adafruit ST7735 and ST7789 Library). However, after modifying the example to simply display some text, something very strange happens
The text is faded, like its missing some pixels. However, when pressing the reset button on the arduino, or programming the board the text is displayed perfectly. Also, if i connect the RST wire to the arduino RESET pin instead of the Digital pin, this text becoming better effect disappears
I'm guessing this is a hardware issue, as there's no way the text can be displayed perfectly on the reset button press or programming, but not when program running
I have the idea of using a HX8347D library instead, but I cannot find a library that uses this screens pins (e.g MOSI)
I have the code and the pictures below, if you have any libraries or suggestions please let me know
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>
// For the breakout board, you can use any 2 or 3 pins.
// These pins will also work for the 1.8" TFT shield.
#define TFT_CS 10
#define TFT_RST 9 // Or set to -1 and connect to Arduino RESET pin
#define TFT_DC 8
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
float p = 3.1415926;
void setup(void) {
// OR use this initializer (uncomment) if using a 2.0" 320x240 TFT:
tft.init(240, 320); // Init ST7789 320x240
uint16_t time = millis();
time = millis() - time;
}
void loop() {
testDisplay();
delay(5000);
}
void testdrawtext(char *text, uint16_t color) {
tft.fillScreen(ST77XX_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(color);
tft.setTextWrap(true);
tft.print(text);
}
void testDisplay(){
testdrawtext("Sentence One ", ST77XX_WHITE);
delay(10000);
testdrawtext("Sentence Two ", ST77XX_WHITE);
}
Wiring: 5V - 5V, GND-GND, MOSI-D11, SCLK-D13, CS-D10, DC-D8, RST-D9, BL-3.3V