Displaying on ILI9341 using ESP32-S3-WROOM1

I’m trying to prepare to display on ILI9341 using ESP32-S3-WROOM-1 from Freenove.

All I get is a white screen. What am I doing wrong, please?

Here is the sketch

#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <SPI.h>
#include <TFT_eSPI.h>
//#include <WiFiManager.h>  // https://github.com/tzapu/WiFiManager


// Pin definitions
#define TFT_CS   1
#define TFT_DC   6
#define TFT_RST  5
#define TFT_MOSI 7
#define TFT_SCK  15
#define TFT_MISO 17



// Use hardware SPI
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);

//#define TFT_GREY 0x5AEB
//int timeout = 120;  // seconds to run for




void setup() {
  Serial.begin(115200);

  Serial.println("starting Display ili9341 ");

  
  
  tft.begin();


  // Set display rotation (optional, 1 is landscape for some displays)
  tft.setRotation(2); 
  
  // Set background color
  tft.fillScreen(ILI9341_YELLOW);
  tft.setCursor(10, 20);
  

  // Set text size
  tft.setTextSize(3); // Size 1 is 6x8 pixels, Size 2 is 12x16, etc.

 


    

  tft.setTextColor(ILI9341_BLACK);

 

  

}

void loop() {
 
  tft.println("Hello world");
 

  
  
  }

I am uncertain, but do you need to configure and include User_Setup.h?

This sketch worked on esp32-wroom without the User_Setup.h

I’m confused, do you want to use the eSPI_TFT library or not?

The eSPI_TFT library has its own setup sequence for the screen, which you will need to configure in the user_setup.h file.

The library is there from another sketch, sorry. Even without it still the same.

This display works only with adafruit, I had it working on esp32, now trying it on esp32-s3

I don't know the pin assignment of your display, but try this:

#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>

// Pin definitions
#define TFT_CS    1
#define TFT_DC    6
#define TFT_RST   5
#define TFT_MOSI  7
#define TFT_SCK   15
#define TFT_MISO  17

// Modify to fit your LCD device
#define TFT_BL    27

// Use hardware SPI
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCK, TFT_RST, TFT_MISO);

void setup() {
  Serial.begin(115200);
  while (millis() < 1000);
  Serial.println("starting Display ili9341 ");

  // Adafruit library should turn on backlight
  pinMode(TFT_BL, OUTPUT);
  digitalWrite(TFT_BL, HIGH);  
  
  tft.begin();

  // Set display rotation (optional, 1 is landscape for some displays)
  tft.setRotation(2); 
  
  // Set background color
  tft.fillScreen(ILI9341_YELLOW);
  tft.setCursor(10, 20);
  
  // Set text size
  tft.setTextSize(3); // Size 1 is 6x8 pixels, Size 2 is 12x16, etc.
  tft.setTextColor(ILI9341_BLACK);
  tft.println("Hello world");
}

void loop() {}

@embeddedkiddie

Thanks, still nothing on my display!!!

The code I provided works fine if I adjust it to suit the pinout of my display.

So check your wiring.

Or if you post a link specifying the specs of your display and some photos of the actual wiring, someone might be able to spot the problem.

I’m using ILI9341

I had the sketch working on esp32, now I’m trying it on esp32-s3

The default SPI pins (miso, mosi, sck etc.) are different between those two boards so you cannot use the same sketch as you did with the ESP32 without adapting it for the S3 variant.
This post may help to determine the correct pins: Blank ILI9341 screen using esp32 s3 - #13 by horace

have a look at need-help-connecting-ili9341-touchscreen-to-my-esp32-s3-devkitc-1u-n8r8

These are the pins definitions:

#define TFT_CS 1 //GPIO1
#define TFT_DC 6 //GPIO6
#define TFT_RST 5 //GPIO5
#define TFT_MOSI 7 //GPIO7
#define TFT_SCK 15 //GPIO15
#define TFT_MISO 17 //GPIO17

Post a photo to verify the wiring.

The purple wire to the left is the LED.

Black&White to the right are GND&Vcc

How does Pin 1 of the ESP32 get to TFT_CS pin? Add a photo above if possible.

From the header yellow wire, that goes through the most right bottom blue wire.

All wires are checked for continuity, from the controller to the display.