I tried to connect the display with ILI9341 controller to arduino nano esp32 using the following pins
in the library TFT_eSPI. I configured User_Setup.h as follows
#define ILI9341_DRIVER
#define TFT_CS 10 // GPIO 10 (D10)
#define TFT_DC 9 // GPIO 9 (D9)
#define TFT_RST 8 // GPIO 8 (D8)
#define TFT_WR 11 // GPIO 11 (D11)
#define TFT_RD 12 // GPIO 12 (D12)
#define TOUCH_CS 5 // GPIO 5 (D5)
#define SPI_FREQUENCY 27000000
#define SPI_TOUCH_FREQUENCY 2500000
and try next sketch
#include <TFT_eSPI.h>
#include <SPI.h>
#define TFT_CS D10
#define TFT_DC D9
#define TFT_WR D11
#define TFT_RD D12
#define TFT_RST D8
TFT_eSPI tft = TFT_eSPI();
unsigned long previousMillis = 0;
const long interval = 1000;
void setup() {
Serial.begin(115200);
tft.init();
tft.setRotation(1);
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextSize(2);
tft.setCursor(0, 0);
tft.println("Hello, World!");
}
void loop() {
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextSize(2);
tft.setCursor(0, 0);
tft.println("Hello, World!");
}
}
but it didn't work and on startup there was a white tap after just black, on the arduino module lights 3 LEDs near the usb green and yellow and near the reset there was a red