LGVL exporting to Arduino IDE

Hi I am having the same issue I got the files exported to IDE and loaded it.

Using the waveshare 4.3 inch S3 Development Board

waveshare.com

ESP32-S3-Touch-LCD-4.3 - Waveshare Wiki

Then I getbthe following error:
(7) GPIO Error
(7) GPIO Error
(10) GPIO Error
(15) GPIO Error

And I have no idea where to get the the GPIO pins and where to change them in the code.

What kind of display driver do you use? TFT_eSPI or something else?

Kisvegabor privileged speaking with you.

To my knowledge ST7262.
Here is the post with most of the information https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3

/*-------------------------------- LCD Related --------------------------------*/
/* Set to 0 if not using LCD */
#define ESP_PANEL_USE_LCD           (1)
#if ESP_PANEL_USE_LCD
/**
 * LCD IC name. Choose one of the following:
 *      - ILI9341
 *      - GC9503, GC9A01
 *      - ST7262, ST7789, ST7796
 */
#define ESP_PANEL_LCD_NAME          ST7262 

/* LCD resolution in pixels */
#define ESP_PANEL_LCD_H_RES         (800)
#define ESP_PANEL_LCD_V_RES         (480)

/* LCD Bus Settings */
/**
 * If set to 1, the bus will skip to initialize the corresponding host. Users need to initialize the host in advance.
 * It is useful if other devices use the same host. Please ensure that the host is initialized only once.
 */
#define ESP_PANEL_LCD_BUS_SKIP_INIT_HOST        (1)
/**
 * LCD bus type. Choose one of the following:
 *      - 0: I2C (not supported yet)
 *      - 1: SPI
 *      - 2: I80 (not supported yet)
 *      - 3: RGB
 */
#define ESP_PANEL_LCD_BUS_TYPE      (3)

LVGL already has some built-in drivers but ST7262 is still missing. However some similar ST7xxx IC-s are supported, so they can be a good starting point. See the docs here.

1 Like

Can I add the driver manually? Thanks for the reply!

#include <Arduino_GFX_Library.h>
#include <Wire.h>
#include <bb_captouch.h>
#include “Rocket_Components.h”

#define GFX_DEV_DEVICE WAVESHARE_ESP32_S3_TFT_4_3 // Define the device as Waveshare ESP32-S3 TFT 4.3"

#define TOUCH_I2C_ADDRESS 0x5D
#define TOUCH_SDA 8
#define TOUCH_SCL 9
#define TOUCH_INT 4
#define TOUCH_RST 0

BBCapTouch bbct;

// Initialize the display object
Arduino_ESP32RGBPanel* rgbpanel = new Arduino_ESP32RGBPanel(
5 /* DE /, // Define Enable pin
3 /
VSYNC /, // Define Vertical Sync pin
46 /
HSYNC /, // Define Horizontal Sync pin
7 /
PCLK */, // Define Pixel Clock pin

1 /* R0 /, 2 / R1 /, 42 / R2 /, 41 / R3 /, 40 / R4 */, // Define Red data pins

39 /* G0 /, 0 / G1 /, 45 / G2 /, 48 / G3 /, 47 / G4 /, 21 / G5 */, // Define Green data pins

14 /* B0 /, 38 / B1 /, 18 / B2 /, 17 / B3 /, 10 / B4 */, // Define Blue data pins

0 /* hsync_polarity /, 40 / hsync_front_porch /, 48 / hsync_pulse_width /, 88 / hsync_back_porch /, // Horizontal sync parameters
0 /
vsync_polarity /, 13 / vsync_front_porch /, 3 / vsync_pulse_width /, 32 / vsync_back_porch /, // Vertical sync parameters
1 /
pclk_active_neg /, 16000000 / prefer_speed */ // Pixel clock parameters
);

Arduino_RGB_Display* gfx = new Arduino_RGB_Display(
800 /* width /, // Display width
480 /
height /, // Display height
rgbpanel, // RGB panel instance
0 /
rotation /, // Screen rotation
true /
auto_flush */ // Enable automatic screen refresh
);

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

if (!gfx->begin()) {
    Serial.println("Display initialization failed!");
    while (1);
}

drawRocketComponents();

}

void loop() {
delay(50); // Placeholder
}