I am trying to do this project: https://electropeak.com/learn/interfaci ... ith-esp32/
I have an ESP32S and a TFT SP1 2.8. I installed the TFT_eSPI libraries (using arduino ide) and edit the USER_SETUP file with the appropriate PINS and versions (I believe). However, I tried different configurations but I was unable to turn on the TFT. I know that the TFT is working because I have used it with another board.
In the USER_SETUP tried with different drivers: ILI9341_DRIVER and ILI9341_2_DRIVER and the result is the same. Also different PINS.
I also run with the differenr boards types: DO IT ESP32 DEVKIT V1, and other ones that also compile.
Can you please help Thank you
The pins are the following in the USER_SETUP file
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 15 // Chip select control pin
#define TFT_DC 4 // Data Command control pin
#define TFT_RST 2 // Reset pin (could connect to RST pin)
The arduino code is the following:
Code: Select all
#include <TFT_eSPI.h> // Hardware-specific library
#include <SPI.h>
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
void setup(void) {
tft.init();
tft.setRotation(0);
Serial.begin(57600); // For debug
tft.fillScreen(TFT_WHITE);
Serial.println("Setup Done");
Serial.println(TFT_MISO);
Serial.println(TFT_MOSI);
Serial.println(TFT_SCLK);
Serial.println(TFT_CS);
Serial.println(TFT_DC);
Serial.println(TFT_RST);
Serial.println(TFT_WIDTH);
Serial.println(TFT_HEIGHT);
#ifdef ILI9341_DRIVER
Serial.println("ILI9341_DRIVER");
#endif
#ifdef ILI9341_2_DRIVER
Serial.println("ILI9341_2_DRIVER");
#endif
}
void loop() {
tft.fillScreen(TFT_GREEN);
delay(250);
tft.fillScreen(TFT_BLACK);
delay(250);
tft.fillScreen(TFT_WHITE);
delay(250);
tft.fillScreen(TFT_RED);
delay(250);
}