I've searched and not found a single thing about connecting the ESP32S3 to a TFT like mine. The display pins are RST, CS, D/C, DIN, CLK, VCC, BL and GND. I tried to connect pins according to other people using the S3s predecessor matching it to the pinout of S3 but it doesn't work. Other versions doesn't have the same display pin as my tft. Please give me the wiring as well as the User_Setup.h code.
Currently I am using this test code:
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
void setup() {
Serial.begin(115200);
Serial.println("Initializing display...");
tft.init();
tft.setRotation(1);
tft.fillScreen(TFT_BLACK);
delay(500);
tft.fillScreen(TFT_RED);
delay(500);
tft.fillScreen(TFT_GREEN);
delay(500);
tft.fillScreen(TFT_BLUE);
delay(500);
tft.fillScreen(TFT_WHITE);
}
void loop() {
for (int i = 0; i < 160; i += 10) {
tft.fillRect(0, i, 128, 10, random(0xFFFF));
delay(100);
}
}
But the screen just flickers white, it also prints this message in my serial monitor:
If the 'normal' setup doesn't work, maybe your TFT is unique. In that case only the maker of the TFT will know the answer.
OR you messed up the 'normal' setup and connections.
Thank you for replying. I am currently trying to get the datasheet from the seller but in the meantime the product description states that the module port is compatible with the 1602 LCD. Does that help with anything, sorry I'm really new to this type of stuff. Oh and it uses and ST7735 driver.
@mkl1901 The TFT_eSPI library has a default setup file that can be modified to fit your configuration, alternatively there is a setup select header file can be used to select a file preconfigured for various displays and controllers, these also can be modified to fit your pin out etc.
Watch this YouTube video it gives a pretty good idea of what to do.
Just for example this is the pin out for a S3 I have setup on my bench
mosi 11 // (DIN)
miso 12 // not always required
sck 13 // (CLK)
led 5 // (BL) not always required
cs 6
dc 7 // (D/C)
rst 8
Hi, I tried to use your setup but it still won't work. I've doubled check the wiring and stuff. But it still won't budge.
Here's my user setup incase I did something wrong:
I had a similar display working with ESP32-C3 with ESP32 core 2.0.14
with ESP32 core 3.1.1 GOES INTO A RESET LOOP and fails with ESP32 core 2.0.15
tried it on an ESP32-S3-DevKitC-1 with ESP32 core 3.1.1 GOES INTO A RESET LOOP
does not work with ESP32 core 2.0.14 blank screen
tried with
#define USE_HSPI_PORT
no longer resets but nothing on screen - probably need to change the pins
file User_Setup.h
// TFT_eSPI setup.h file for ESP32-S3 1.8 inch_ST7735_TFT
// note: ESP32 core 3.1.1 DOES NOT WORK - GOES INTO A RESET LOOP
// ESP32-C3 works with ESP32 core 2.0.14 fails with ESP32 core 2.0.15
// ESP32-S3-DevKitC-1 with ESP32 core 3.1.1 GOES INTO A RESET LOOP
// does not work with ESP32 core 2.0.14 blank screen
#define USER_SETUP_INFO "User_Setup"
#define USE_HSPI
#define ST7735_DRIVER // Full configuration option, define additional parameters below for this display
//#define ST7735_GREENTAB
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
// Try ONE option at a time to find the correct colour order for your display
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
// For ST7789, ST7735, ILI9163 and GC9A01 ONLY, define the pixel width and height in portrait orientation
#define TFT_WIDTH 128 // ST7789 240 x 240 and 240 x 320
#define TFT_HEIGHT 160 // ST7789 240 x 320
// If colours are inverted (white shows as black) then uncomment one of the next
// 2 lines try both options, one of the options should correct the inversion.
// #define TFT_INVERSION_ON
// #define TFT_INVERSION_OFF
// ESP32-C3 supermini
#define TFT_CS 10//SS // GPIO 7
#define TFT_MOSI 11//MOSI // GPIO 6
#define TFT_SCLK 12//SCK // GPIO 4
#define TFT_MISO -1 //MISO
#define TFT_DC 9
#define TFT_RST 5
#define LOAD_GLCD
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF
#define SMOOTH_FONT
#define SPI_FREQUENCY 40000000
#define SPI_TOUCH_FREQUENCY 2500000