Skip to content

unrecognisable issue #19

@sujay119

Description

@sujay119

Hi ,
I’m new to the ESP32 world, and I recently got a LilyGo T-Display S3 Pro board to create a photo viewer that reads images from an SD card.

Initially, I uploaded a simple SD card reading code, and it worked fine. However, after that, the board started showing errors, and now it won’t start at all.

If I try uploading another code, it throws GPIO errors.
If I fix those, it says the T-Display S3 Pro setup is not selected, even though I selected it in the configuration.
I’m stuck and don’t know how to proceed. Any help would be appreciated!

Here’s what I’ve tried so far:

Ensured the correct board is selected in the Arduino IDE.
Verified the User_Setup_Select.h file in the TFT_eSPI library to confirm the correct setup is uncommented.
Reinstalled the drivers and libraries.
My Setup:
Board: LilyGo T-Display S3 Pro
IDE: Arduino IDE

CODE:
#include <TFT_eSPI.h>
#include <SD.h>

#define SD_CS 5 // Adjust to your SD card CS pin

TFT_eSPI tft = TFT_eSPI();

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

// Initialize TFT display
tft.begin();
tft.setRotation(1);
tft.fillScreen(TFT_BLACK);

// Initialize SD card
if (!SD.begin(SD_CS)) {
tft.fillScreen(TFT_RED);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.drawString("SD Init Failed!", 10, 10);
while (true);
}

tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.drawString("SD Initialized!", 10, 10);

// Test: List files on the SD card
File root = SD.open("/");
tft.drawString("Files on SD:", 10, 30);
int y = 50;
while (true) {
File file = root.openNextFile();
if (!file) break;
tft.drawString(file.name(), 10, y);
y += 20;
file.close();
}
}

void loop() {}
AFTER THIS IT STARTED

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions