2.1 lcd St7701s with ESP32s2

Hello, I've been having issues getting my first hello world code to run.
I am using the ESP32 S2
with this display: https://www.buydisplay.com/480x480-round-ips-tft-lcd-display-2-1-inch-capactive-touch-circle-screen

Please post your sketch, using code tags when you do and describe the problems

How is the display connected to the ESP32 ?

Ref.: ER-TFT021-1 arduino - Google Search

This code in ESP32S3 i want change it in ESP32S2

#include <SPI.h>
#include <Arduino_GFX_Library.h>
#include <Adafruit_GFX.h>
#define GFX_BL 45 // default backlight pin, you may replace DF_GFX_BL to actual backlight pin

#if defined(DISPLAY_DEV_KIT)
Arduino_GFX *gfx = create_default_Arduino_GFX();
#else /* !defined(DISPLAY_DEV_KIT) */

/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
Arduino_ESP32RGBPanel *bus = new Arduino_ESP32RGBPanel(
//Arduino_ESP32SPI *bus = new Arduino_ESP32RGBPanel(
//Arduino_DataBus *bus = new Arduino_SWSPI(
 40 /* CS */, 48 /* SCK */, 47 /* SDA */,
  18 /* DE */, 17 /* VSYNC */, 42 /* HSYNC */, 21 /* PCLK */,
  4 /* R0 */, 3 /* R1 */, 2 /* R2 */, 1 /* R3 */, 0 /* R4 */,
  10 /* G0 */, 9 /* G1 */, 8 /* G2 */, 7 /* G3 */, 6 /* G4 */, 5 /* G5 */,
  41 /* B0 */, 14 /* B1 */, 13 /* B2 */, 12 /* B3 */, 11 /* B4 */
);

/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
Arduino_ST7701_RGBPanel *gfx = new Arduino_ST7701_RGBPanel(
  bus, GFX_NOT_DEFINED, 480 /* width */, 480 /* height */);
#endif /* !defined(DISPLAY_DEV_KIT) */
/*******************************************************************************
 * End of Arduino_GFX setting
 ******************************************************************************/

void setup(void)
{
    gfx->begin();
    gfx->fillScreen(BLACK);

#ifdef GFX_BL
    pinMode(GFX_BL, OUTPUT);
    digitalWrite(GFX_BL, HIGH);
#endif


    gfx->setCursor(100, 100);
    gfx->setTextColor(RED);
    gfx->println("Hello World!");

    delay(5000); // 5 seconds
}

void loop()
{
    gfx->setCursor(random(gfx->width()), random(gfx->height()));
    gfx->setTextColor(random(0xffff), random(0xffff));
    gfx->setTextSize(random(6) /* x scale */, random(6) /* y scale */, random(2) /* pixel_margin */);
    gfx->println("Hello World!");

    delay(1000); // 1 second
}

hey! I just recently got that display working using Arduino GFX library :

in the display classes tab of the wiki for that library it says it is only supported with esp32-s3. In my experience the esp32s3 you need to run this display specifically is the ESP32-S3-DevKitC-1-N8R8.

Im not sure if using the s2 with this library will be possible. The repository owner is quite responsive on github so you may want to ask him. to my knowledge he updated the repository with the code I supplied to him but I have not verified that the library update works out of the box now.

I can try to answer any more specific questions about my set up. I documented as much as I could about how I got my display working on that thread that @rtek1000 linked to.

-good luck

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.