ESP32-S3-Touch screen not working

Hello all

I started a project using the waveshare ESP32-S3-Touch-LCD-7. While the communication with the serial monitor works just fine, I can’t get the screen to display anything.

First I tried to follow this guide: https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-7#Environment_Setup

As no example worked, I resorted to Gemini to get another attempt at it. But I never got more than a dimly lit backlight…

The board is connected to my PC via the UART-port and to be sure it has enough power, I connected the USB to a power supply.

I chose the ESP32S3 Dev Module in the Arduino IDE, the settings are currently as follows:

The last code I tried (by Gemini):

#include <Arduino_GFX_Library.h>
#include <Wire.h>

#define TFT_BL 2
#define I2C_SDA 10
#define I2C_SCL 11

// Using 10MHz (10000000L) - a perfect integer divider for S3 (160/16)
Arduino_ESP32RGBPanel *bus = new Arduino_ESP32RGBPanel(
    GFX_NOT_DEFINED, GFX_NOT_DEFINED, GFX_NOT_DEFINED,
    41 /* DE */, 40 /* VSYNC */, 39 /* HSYNC */, 42 /* PCLK */,
    14 /* R0 */, 21 /* R1 */, 47 /* R2 */, 48 /* R3 */, 45 /* R4 */,
    9  /* G0 */, 46 /* G1 */, 3  /* G2 */, 8  /* G3 */, 16 /* G4 */, 1 /* G5 */,
    15 /* B0 */, 7  /* B1 */, 6  /* B2 */, 5  /* B3 */, 4  /* B4 */,
    0, 8, 4, 8,
    0, 8, 4, 8,
    10000000L 
);

Arduino_RGB_Display *gfx = new Arduino_RGB_Display(800, 480, bus, 0, true);

void setup() {
  Serial.begin(115200);
  delay(2000); // Wait for Serial
  Serial.println("--- WAVESHARE S3 REV 1.2 RECOVERY ---");

  // 1. Initialize I2C with lower frequency for stability
  Wire.begin(I2C_SDA, I2C_SCL, 100000); 

  // 2. Scan I2C to find the Expander
  Serial.println("Scanning I2C...");
  byte error, address;
  for(address = 1; address < 127; address++ ) {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
    if (error == 0) {
      Serial.printf("Found device at 0x%02X - Initializing...\n", address);
      // Attempt to wake up the expander at whatever address we found
      Wire.beginTransmission(address);
      Wire.write(0x01); 
      Wire.write(0xFF); 
      Wire.endTransmission();
    }
  }

  // 3. Enable Backlight
  pinMode(TFT_BL, OUTPUT);
  digitalWrite(TFT_BL, HIGH);
  Serial.println("Backlight pin set HIGH");

  // 4. Start Graphics
  Serial.println("Starting LCD Bus...");
  if (!gfx->begin()) {
    Serial.println("GFX Begin Failed!");
    while(1) delay(100);
  }

  gfx->fillScreen(0x07E0); // Bright Green
  gfx->setCursor(100, 200);
  gfx->setTextColor(0xFFFF);
  gfx->setTextSize(5);
  gfx->println("LINK ESTABLISHED");
  
  Serial.println("Setup Complete.");
}

void loop() {
  delay(1000);
}

In the serial monitor, this is printed:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x116c
load:0x403c8700,len:0xc2c
load:0x403cb700,len:0x3108
entry 0x403c88b8

assert failed: lcd_ll_set_pixel_clock_prescale /IDF/components/hal/esp32s3/include/hal/lcd_ll.h:167 (prescale > 0 && prescale <= LCD_LL_PCLK_DIV_MAX)


Backtrace: 0x4037c2d9:0x3fcebc30 0x4037c2a1:0x3fcebc50 0x403830ba:0x3fcebc70 0x4201919d:0x3fcebdb0 0x4201505b:0x3fcebe00 0x420144c3:0x3fcebe40 0x420033bc:0x3fcebe70 0x42003496:0x3fcebf40 0x42002351:0x3fcebf60 0x4200810d:0x3fcebf80 0x4037d221:0x3fcebfa0




ELF file SHA256: 10d0bac60


Has anybody a sketch that should work and display something, so I can verify that the display is actually working? Or give other guidance here? I spent the last few hours with this problem, tried different libraries and so on and just can’t get anything displayed…

Thank you in advance!

Hi. Did it work in the meantime? I have the same device and I did try the Demo (ESP32-S3-Touch-LCD-7B Demo) from here: https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-7B and that gave me something on the display.

Hello

Thank you for your answer. I managed to get it running. I also used the demo and I don’t know what I did wrong the first time.

I however am really struggling with the I2C know. I’m running into conflict with different versions and just can’t solve it. I’m trying to read the data from a BME680 but nothing seems to work.

Do you have any tips regarding this matter?

Show your wiring diagram and a picture of the devices you are using.

Sorry for the delayed answer. I (or actually Claude) got it running with this code:

void I2C_init() {

    i2c_config_t conf = {

        .mode = I2C_MODE_MASTER,

        .sda_io_num = 8,

        .scl_io_num = 9,

        .sda_pullup_en = GPIO_PULLUP_ENABLE,

        .scl_pullup_en = GPIO_PULLUP_ENABLE,

        .master = { .clk_speed = 400000 }

    };

    i2c_param_config(I2C_NUM_0, &conf);

    i2c_driver_install(I2C_NUM_0, I2C_MODE_MASTER, 0, 0, 0);

    Serial.println("I2C gestartet");

}

I hope this might help someone experiencing the same and this thread can be closed.

Hi halbflauschmammut, I'm trying to get this board running but having a very hard time. The examples from waveshare are just utterly useless. Would you happen to have a script that works & you're currently using?