ESP32-S3 Arduino LVGL WIFI&Bluetooth Development Board 4.0 "480 * 480 Smart Display 4.0 inch LCD TFT Module Capacitive Touch

Which platformio_options are you using to make it work?

Initially I had some errors too. Then I found out that any device Id that isnā€™t exactly what you have will prevent the yaml file from loading and it will throw an error.

Now it seems to hang on Unpacking ā€¦ but I leave it for some time to see whether it will come to live

INFO ESPHome 2024.4.2
INFO Reading configuration /config/esphome/display-woonkamer.yamlā€¦
WARNING GPIO45 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See Frequently Asked Questions ā€” ESPHome
INFO Generating C++ sourceā€¦
INFO Compiling appā€¦
Processing display-woonkamer (board: esp32-s3-devkitc-1; framework: espidf; platform: platformio/[email protected])

Tool Manager: Installing espressif/toolchain-esp32ulp @ 2.35.0-20220830
INFO Installing espressif/toolchain-esp32ulp @ 2.35.0-20220830
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/framework-espidf @ ~3.40406.0
INFO Installing platformio/framework-espidf @ ~3.40406.0
Downloading [####################################] 100%
Unpacking [####################################] 100%

If you donā€™t have this device, devils_ivy_moisture, in your HA setup, then it will throw an error.
Same for the other one.

Iā€™m seeing the same loop on boot
Iā€™ve updated the devils_ivy_moisture and outdoor_temperature to be valid sensors in my home assistant but still not working

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x18 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:QIO, clock div:1
load:0x3fce3808,len:0x1658
ets_loader.c 78 
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x18 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:QIO, clock div:1
load:0x3fce3808,len:0x1658
ets_loader.c 78 
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x18 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:QIO, clock div:1
load:0x3fce3808,len:0x1658
ets_loader.c 78 

I got this screen working an even used the LVGL (BETA) component in ESPhome.

1 Like

This is main workirng configuration without LVGL.

esphome:
  name: esp32-4848s040
  friendly_name: ESP32-4848S040

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  flash_size: 16MB
  framework:
    type: esp-idf
    sdkconfig_options:
      COMPILER_OPTIMIZATION_SIZE: y
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
      CONFIG_ESP32S3_DATA_CACHE_64KB: y
      CONFIG_ESP32S3_DATA_CACHE_LINE_64B: y
      CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
      CONFIG_SPIRAM_RODATA: y  

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "****"

ota:
  password: "****"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-4848S040"
    password: "****"

captive_portal:
  
psram:
  mode: octal
  speed: 80MHz

spi:
  clk_pin: 48
  mosi_pin: 47
#  miso_pin: 41

i2c:
  - id: bus_a
    sda: 19
    scl: 45
    scan: false
    #frequency: 100kHz

switch:
  - platform: gpio
    pin: 40
    id: relay1
    name: Relay 1

#  - platform: gpio
#    pin: 2
#    id: relay2
#    name: Relay 2

#  - platform: gpio
#    pin: 1
#    id: relay3
#    name: Relay 3

output:
  - platform: ledc
    pin: GPIO38
    id: bl_led_pin
    inverted: False

light:
  - platform: monochromatic
    output: bl_led_pin
    name: "Display Backlight"
    id: back_light
    restore_mode: ALWAYS_ON

binary_sensor:
  - platform: status
    id: status_sensor
    internal: True
    on_press: 
      then:
        - component.update: display4inch

font:
  - file: 'fonts/arial.ttf'
    id: arial
    size: 18

  - file: 'fonts/arial.ttf'
    id: arial_big
    size: 96

display:
  - platform: st7701s
    id: display4inch
    update_interval: never
    auto_clear_enabled: False
    spi_mode: MODE3
    data_rate: 2MHz
    color_order: RGB
    invert_colors: False
    dimensions:
      width: 480
      height: 480
    cs_pin: 39
    de_pin: 18
    hsync_pin: 16
    vsync_pin: 17
    pclk_pin: 21
    pclk_frequency: 12MHz
    pclk_inverted: False
    hsync_pulse_width: 8
    hsync_front_porch: 10
    hsync_back_porch: 20
    vsync_pulse_width: 8
    vsync_front_porch: 10
    vsync_back_porch: 10
    init_sequence:
      - 1
      # Custom sequences are an array, first byte is command, the rest are data.
      - [ 0xFF, 0x77, 0x01, 0x00, 0x00, 0x10 ] # CMD2_BKSEL_BK0
      - [0xCD, 0x00] # disable MDT flag
    data_pins:
      red:
        - 11        #r1
        - 12        #r2
        - 13        #r3
        - 14        #r4
        - 0         #r5
      green:
        - 8         #g0
        - 20        #g1
        - 3         #g2
        - 46        #g3
        - 9         #g4
        - 10        #g5
      blue:
        - 4         #b1
        - 5         #b2
        - 6         #b3
        - 7         #b4
        - 15        #b5
    pages:
      - id: deff
        lambda: |-
          // it.fill(COLOR_BLACK);
          it.filled_rectangle(0, 0, 200, 200, id(my_black));
          it.print(50, 50, id(arial), id(my_red), TextAlign::TOP_LEFT, "Hello World!");
          it.printf(50, 70, id(arial), id(my_white), TextAlign::TOP_LEFT, "Brightness %.0f", id(back_light).current_values.get_brightness() * 100.0);
          // test RGB pattern
          //it.line(200, 99, 320, 99, id(my_white));
          for(int i = 0; i < 256; i++) {
            it.line(200, i + 100, 240, i + 100, Color(i, 0, 0));
            it.line(240, i + 100, 280, i + 100, Color(0, i, 0));
            it.line(280, i + 100, 320, i + 100, Color(0, 0, i));
          }

touchscreen:
  platform: gt911
  id: touchscreen_4_inches
  i2c_id: bus_a
  on_touch:
    then:
      - component.update: display4inch
      - logger.log:
            format: Touch at (%d, %d)
            args: [touch.x, touch.y]
      - lambda: |-
            ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
                touch.x,
                touch.y,
                touch.x_raw,
                touch.y_raw
                );

color:
  - id: my_white
    red: 100%
    green: 100%
    blue: 100%
  - id: my_red
    red: 100%
    green: 0%
    blue: 0%
  - id: my_black
    red: 2%
    green: 2%
    blue: 0%
2 Likes

I found the root cause. Itā€™s a USB port problem.
Iā€™ve switch to another USB port and it now works. No more constant rebooting.