Forget about the TFT.h library. It is crap.
-
Post a link to the actual display that you have bought.
-
Install Adafruit_ST7735 and Adafruit_GFX via the IDE Library Manager.
-
Run the examples. Select the Software SPI constructor to suit your ESP32 wiring.
-
Then connect the Hardware SPI wiring e.g.
#define TFT_MOSI 23
#define TFT_MISO 19
#define TFT_SCK 18
#define TFT_SS 5
#define TFT_DC 13 //
#define TFT_RESET 12 //
- Run the examples with the HW SPI constructor.
This might sound a bit complicated. When we have links to your actual hardware i.e. display board and ESP32 board, we can walk you through every step.
David.