I am sort of confused by this set of postings as you mention T4 but then show T-LC...
Also looks like you are including two different sets of drivers for this display:
That is you have:
Code:
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <ST7789_t3.h>
#include <SPI.h>
Either use the Adafruit_St7789 or the ST7789_t3 (don't remember when using this if you also need to include the ST7735.h file as well.
But if you look at the ST7735_t3 library and open up the example sketch graphictest, you will see that it can be configured for multiple displays.
The first part you need to make sure of, is it creating an ST7735 or an ST7789 display object. That is there are options toward the start of the sketch: like:
Code:
ST7789_t3 tft = ST7789_t3(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCK, TFT_RST);
Then there are options for several different initialize or begin methods to be called. Only one should be uncommented. Probably in your case:
Code:
// OR use this initializer (uncomment) if using a 240x240 clone
// that does not have a CS pin2.0" 320x240 TFT:
tft.init(240, 240, SPI_MODE2); // Init ST7789 240x240 no CS
Then hopefully it should work.
But warning with these displays you can not have any other SPI object on that buss as there is no way to signal the display if the SPI data is for it or for some other device.