Arduino_ESP32RGBPanel *rgbpanel = new Arduino_ESP32RGBPanel( 5 /* DE */, 3 /* VSYNC */, 46 /* HSYNC */, 7 /* PCLK */, 1 /* R0 */, 2 /* R1 */, 42 /* R2 */, 41 /* R3 */, 40 /* R4 */, 39 /* G0 */, 0 /* G1 */, 45 /* G2 */, 48 /* G3 */, 47 /* G4 */, 21 /* G5 */, 14 /* B0 */, 38 /* B1 */, 18 /* B2 */, 17 /* B3 */, 10 /* B4 */, 0 /* hsync_polarity */, 40 /* hsync_front_porch */, 48 /* hsync_pulse_width */, 88 /* hsync_back_porch */, 0 /* vsync_polarity */, 13 /* vsync_front_porch */, 3 /* vsync_pulse_width */, 32 /* vsync_back_porch */, 1 /* pclk_active_neg */, 16000000 /* prefer_speed */); Arduino_RGB_Display *gfx = new Arduino_RGB_Display( 800 /* width */, 480 /* height */, rgbpanel, 0 /* rotation */, true /* auto_flush */); #define SCK 12 #define MISO 13 #define MOSI 11 #define SD_CS 4 #define TOUCH_SDA 8 #define TOUCH_SCL 9 #define TOUCH_INT -1 #define TOUCH_RST 1 #define LCD_RST 3 // LCD reset pin #define SD_CS 4 // SD card select pin #define USB_SEL 5 // USB select pin #define TOUCH_WIDTH 800 #define TOUCH_HEIGHT 480 SPIClass spi2(HSPI); void setup(){ Serial.begin(115200); spi2.begin(SCK, MISO, MOSI, SD_CS); if(!SD.begin(SD_CS,spi2)){ // if(!SD.begin()){ Serial.println("Card Mount Failed"); return; } }