ESP32-S3 4.3inch Capacitive Touch Display from - waveshare

Hello folks!

I did find a nice tuthscreen hardware that perhaps can be used for in wall switch screen.

I hope I can make a chassi for it when it coming. Why I want this is that it have so many options to use. For instance i want to have weird connection so I can use it if network goes down. It has interfaces
like ( USB, I2C, rs485 and CAN, UART ) going to be really fun to play with. If a can get all interested things I want this type of unit in home I buy some more.

Some features I am after.

Inter com (video controll to other units and door)
Weird connected.
Un an In Docking. With use of build in battery.

ESP32-S3 4.3inch Capacitive Touch Display Development Board, 800Ă—480, 5-point Touch, 32-bit LX7 Dual-core Processor

Link here.

2 Likes

I have been looking at some options from Seeed Studio - they have versions with cameras, audio and POE. They also work with Home Assistant…

2 Likes

Thx for info.

Ye speed studio have nice stuff.
But to compare it whit that I order is the price difference a bit big.

I read some more about It and added to my list of screen in wall project. I wand this screens have ability to dock in to the switch socket. Some sort of docking solution with 4 weird magnets so it get easy .

I did actually order this one from speed studio.

It’s seams to be flexible enough to customize.

1 Like

I bought one of these for the same thing and to test with since it was so cheap. So far I have it setup in esphome but I have only been able to get some sensor data from it. I have not been able to get the screen to work, or send any data to it for a dashboard. Hoping someone knows how to get this working.

can you share your esphome config?

Right now this is what I have. I know it is not 100% correct but it gets it connected and I can see sensor values from it.

esphome:
  name: esp-display
  friendly_name: ESP Display

esp32:
  board: esp32s3box
  framework:
    type: arduino

# Enable logging
logger:

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6

i2c:
  sda: GPIO08
  scl: GPIO09

light:
  - platform: monochromatic
    output: lcd_backlight
    name: "LCD Backlight"
    restore_mode: ALWAYS_ON

output:
  - platform: ledc
    pin: GPIO45
    id: lcd_backlight

time:
  - platform: homeassistant
    id: time_ha
    timezone: America/Los_Angeles

# 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: "Esp-Display Fallback Hotspot"
    password: "vgRG01ttfYPc"

bluetooth_proxy:
  active: true

button:
  - platform: restart
    name: "Restart Device"

text_sensor:
  - platform: wifi_info
    ip_address:
      name: IP Address
    ssid:
      name: Connected SSID
    bssid:
      name: Connected BSSID
    mac_address:
      name: Mac Wifi Address
    scan_results:
      name: Latest Scan Results

sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s

  - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

captive_portal:
    
2 Likes

Any luck with the display?
I got mine today, must say I like it a lot, feels solid compared to others I’ve got. Now it’s just that little thing get it up and running in ESPHome.
Have you seen this: RPI_DPI_RGB Display Driver — ESPHome looks promising.
Fingers crossed…

I have not had any time recently to mess with it. When I get some time though I will take a look at those drivers. Thanks

Well I made an account just to post this but here is where I have made it to.

This is the config I am using because I had to go from the arduino framework to the esp-idf framework

esphome:
  name: esp-display
  friendly_name: ESP Display
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: esp32s3box
  framework:
    type: esp-idf


# Enable logging
logger:
  level: DEBUG

spi:
  clk_pin:
    number: 7
    allow_other_uses: true
  mosi_pin: GPIO6

i2c:
  sda: GPIO08
  scl: GPIO09

time:
  - platform: homeassistant
    id: time_ha
    timezone: -bzzt-

# Enable Home Assistant API
api:
  encryption:
    key: "-bzzt-"

ota:
  password: "-bzzt-"

wifi:
  ssid: -bzzt-
  password: -bzzt-

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp-Display Fallback Hotspot"
    password: "-bzzt-"

bluetooth_proxy:
  active: true

button:
  - platform: restart
    name: "Restart Device"

text_sensor:
  - platform: wifi_info
    ip_address:
      name: IP Address
    ssid:
      name: Connected SSID
    bssid:
      name: Connected BSSID
    mac_address:
      name: Mac Wifi Address
    scan_results:
      name: Latest Scan Results

sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s

  - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

captive_portal:
    
display:
  - platform: rpi_dpi_rgb
    auto_clear_enabled: false
    color_order: RGB
    pclk_frequency: 16MHz
    dimensions:
      width: 800
      height: 480
    de_pin:
      number: 5
    hsync_pin:
      number: 46
      ignore_strapping_warning: true
    vsync_pin:
      number: 3
      ignore_strapping_warning: true
    pclk_pin:
      number: 7
      allow_other_uses: true
    hsync_back_porch: 30
    hsync_front_porch: 210
    hsync_pulse_width: 30
    vsync_back_porch: 4
    vsync_front_porch: 4
    vsync_pulse_width: 4
    data_pins:
      red:
        - 1         #r3
        - 2         #r4
        - 42        #r5
        - 41        #r6
        - 40        #r7
      blue:
        - 14        #b3
        - 38        #b4
        - 18        #b5
        - 17        #b6
        - 10        #b7
      green:
        - 39        #g2
        - 0         #g3
        - 45        #g4
        - 48        #g5
        - 47        #g6
        - 21        #g7

The problem I am having now is that it will not compile

E:\NextCloud\workspace\esp_home\display>esphome run esp-display.yml 
INFO ESPHome 2024.3.0
INFO Reading configuration esp-display.yml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp-display (board: esp32s3box; framework: espidf; platform: platformio/[email protected])
-------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32s3box.html
PLATFORM: Espressif 32 (5.4.0) > Espressif ESP32-S3-Box
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.40406.240122 (4.4.6)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40400.0 (4.4.0)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 2.35.0-20220830
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 2 compatible libraries
Scanning dependencies...
Dependency Graph
|-- noise-c @ 0.1.4
Building in release mode
Linking .pioenvs\esp-display\firmware.elf
c:/users/lonewolf/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: .pioenvs/esp-display/src/main.o:(.literal._Z5setupv+0x18c): undefined reference to `vtable for esphome::rpi_dpi_rgb::RpiDpiRgb'
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\esp-display\firmware.elf] Error 1
================================================= [FAILED] Took 13.44 seconds =================================================

Okay I learned about the esphome clean command and now I have a SHINY NEW ERROR :smiley:

I am going to keep poking at it tonight and if someone has a suggestion to solve the problem that would be cool, or if I solve it myself I will post here.

INFO Successfully uploaded program.
INFO Starting log output from COM6 with baud rate 115200
[20:53:06]I (170) esp_image: segment 1: paddr=00059ad4 vaddr=3fc9ac30 size=04454h ( 17492) load
[20:53:06]I (174) esp_image: segment 2: paddr=0005df30 vaddr=40374000 size=020e8h (  8424) load
[20:53:06]I (178) esp_image: segment 3: paddr=00060020 vaddr=42000020 size=ef8dch (981212) map
[20:53:06]I (360) esp_image: segment 4: paddr=0014f904 vaddr=403760e8 size=14b3ch ( 84796) load
[20:53:06]I (388) boot: Loaded app from partition at offset 0x10000
[20:53:06]I (417) boot: Set actual ota_seq=1 in otadata[0]
[20:53:06]I (418) boot: Disabling RNG early entropy source...
[20:53:06]I (418) cpu_start: Multicore app
[20:53:06]I (421) cpu_start: Pro cpu up.
[20:53:06]I (425) cpu_start: Starting app cpu, entry point is 0x403770b0
[20:53:06]I (0) cpu_start: App cpu up.
[20:53:06]I (440) cpu_start: Pro cpu start user code
[20:53:06]I (440) cpu_start: cpu freq: 160000000
[20:53:06]I (441) cpu_start: Application information:
[20:53:06]I (441) cpu_start: Project name:     esp-display
[20:53:06]I (442) cpu_start: App version:      2024.3.0
[20:53:06]I (442) cpu_start: Compile time:     Mar 22 2024 20:52:05
[20:53:06]I (443) cpu_start: ELF file SHA256:  a32fa41bc82d61da...
[20:53:06]I (444) cpu_start: ESP-IDF:          4.4.6
[20:53:06]I (445) cpu_start: Min chip rev:     v0.0
[20:53:06]I (445) cpu_start: Max chip rev:     v0.99 
[20:53:06]I (446) cpu_start: Chip rev:         v0.2
[20:53:06]I (446) heap_init: Initializing. RAM available for dynamic allocation:
[20:53:06]I (447) heap_init: At 3FCA7378 len 00042398 (264 KiB): D/IRAM
[20:53:06]I (448) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DIRAM
[20:53:06]I (449) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
[20:53:06]I (450) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
[20:53:06]I (452) spi_flash: detected chip: gd
[20:53:06]I (452) spi_flash: flash io: dio
[20:53:06]W (453) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
[20:53:06]I (455) sleep: Configure to isolate all GPIO pins in sleep state
[20:53:06]I (456) sleep: Enable automatic switching of GPIO sleep configuration
[20:53:06]I (457) coexist: coexist rom version e7ae62f
[20:53:06]I (458) cpu_start: Starting scheduler on PRO CPU.
[20:53:06]I (0) cpu_start: Starting scheduler on APP CPU.
[20:53:06][I][logger:158]: Log initialized
[20:53:06][C][ota:483]: There have been 0 suspected unsuccessful boot attempts.
[20:53:06][D][esp32.preferences:114]: Saving 1 preferences to flash...
[20:53:06][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[20:53:06][I][app:029]: Running through setup()...
[20:53:06][D][spi:039]: Setting up SPI bus...
[20:53:06][C][i2c.idf:017]: Setting up I2C bus...
[20:53:06][I][i2c.idf:233]: Performing I2C bus recovery
[20:53:06][D][esp-idf:000]: I (185) gpio: GPIO[9]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
[20:53:06]
[20:53:06][D][esp-idf:000]: I (186) gpio: GPIO[8]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
[20:53:06]
[20:53:06][D][text_sensor:064]: 'Mac Wifi Address': Sending state '80:65:99:A4:F8:18'
[20:53:06][C][rpi_dpi_rgb:009]: Setting up RPI_DPI_RGB
[20:53:06][D][esp-idf:000]: E (222) lcd_panel.rgb: esp_lcd_new_rgb_panel(151): no mem for frame buffer
[20:53:06]
[20:53:06][E][rpi_dpi_rgb:037]: lcd_new_rgb_panel failed: ESP_ERR_NO_MEM
[20:53:06][D][esp-idf:000]: E (225) lcd_panel: esp_lcd_panel_reset(15): invalid panel handle
[20:53:06]
[20:53:06]ESP_ERROR_CHECK failed: esp_err_t 0x102 (ESP_ERR_INVALID_ARG) at 0x40380b34
[20:53:06]file: "src/esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.cpp" line 39
[20:53:06]func: virtual void esphome::rpi_dpi_rgb::RpiDpiRgb::setup()
[20:53:06]expression: esp_lcd_panel_reset(this->handle_)
[20:53:06]
[20:53:06]abort() was called at PC 0x40380b37 on core 1
[20:53:06]
[20:53:06]
[20:53:06]Backtrace: 0x40377a8a:0x3fcede40 0x40380b41:0x3fcede60 0x40387d06:0x3fcede80 0x40380b37:0x3fcedef0 0x42010761:0x3fcedf10 0x42017348:0x3fcedfd0 0x420ea705:0x3fcedff0 0x42016e6d:0x3fcee010 0x42019a59:0x3fcee040 0x4200b4e3:0x3fcee180
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x40377a8a: panic_abort at C:\Users\lonewolf\.platformio\packages\framework-espidf\components\esp_system/panic.c:408
WARNING Decoded 0x40380b41: esp_system_abort at C:\Users\lonewolf\.platformio\packages\framework-espidf\components\esp_system/esp_system.c:137
WARNING Decoded 0x40387d06: abort at C:\Users\lonewolf\.platformio\packages\framework-espidf\components\newlib/abort.c:46
WARNING Decoded 0x40380b37: _esp_error_check_failed at C:\Users\lonewolf\.platformio\packages\framework-espidf\components\esp_system/esp_err.c:43
WARNING Decoded 0x42010761: esphome::rpi_dpi_rgb::RpiDpiRgb::setup() at E:\NextCloud\workspace\esp_home\display\.esphome\build\esp-display/src/esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.cpp:40 (discriminator 1)
WARNING Decoded 0x42017348: esphome::PollingComponent::call_setup() at E:\NextCloud\workspace\esp_home\display\.esphome\build\esp-display/src/esphome/core/component.cpp:207
WARNING Decoded 0x420ea705: esphome::Component::call() at E:\NextCloud\workspace\esp_home\display\.esphome\build\esp-display/src/esphome/core/component.cpp:99
WARNING Decoded 0x42016e6d: esphome::Application::setup() at E:\NextCloud\workspace\esp_home\display\.esphome\build\esp-display/src/esphome/core/application.cpp:38
WARNING Decoded 0x42019a59: setup() at E:\NextCloud\workspace\esp_home\display\.esphome\build\esp-display/src/main.cpp:880
WARNING Decoded 0x4200b4e3: esphome::loop_task(void*) at E:\NextCloud\workspace\esp_home\display\.esphome\build\esp-display/src/esphome/components/esp32/core.cpp:67
[20:53:06]
[20:53:06]
[20:53:06]
[20:53:06]
[20:53:06]ELF file SHA256: a32fa41bc82d61da
[20:53:06]
1 Like

Okay I got the display displaying a test image, it is buggy and unstable though. Config below.

If anybody knows how to interact with touch interfaces to drive commands in home assistant it would be appreciated. I started looking at the lvgl stuff but that looks like its far too early in development to be useful.

esphome:
  name: esp-display
  friendly_name: ESP Display
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: esp32s3box
  framework:
    type: esp-idf

psram:
  mode: octal
  speed: 120M

# Enable logging
logger:
#  level: DEBUG

spi:
  clk_pin:
    number: 7
    allow_other_uses: true
  mosi_pin: GPIO6

i2c:
  sda: GPIO08
  scl: GPIO09

time:
  - platform: homeassistant
    id: time_ha
    timezone: -bzzt-

# Enable Home Assistant API
api:
  encryption:
    key: "-bzzt-"

ota:
  password: "-bzzt-"

wifi:
  ssid: -bzzt-
  password: -bzzt-

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp-Display Fallback Hotspot"
    password: "-bzzt-"

bluetooth_proxy:
  active: true

button:
  - platform: restart
    name: "Restart Device"

text_sensor:
  - platform: wifi_info
    ip_address:
      name: IP Address
    ssid:
      name: Connected SSID
    bssid:
      name: Connected BSSID
    mac_address:
      name: Mac Wifi Address
    scan_results:
      name: Latest Scan Results

sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s

  - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

captive_portal:
    
display:
  - platform: rpi_dpi_rgb
    auto_clear_enabled: false
    color_order: RGB
    pclk_frequency: 16MHz
    dimensions:
      width: 800
      height: 480
    de_pin:
      number: 5
    hsync_pin:
      number: 46
      ignore_strapping_warning: true
    vsync_pin:
      number: 3
      ignore_strapping_warning: true
    pclk_pin:
      number: 7
      allow_other_uses: true
    hsync_back_porch: 30
    hsync_front_porch: 210
    hsync_pulse_width: 30
    vsync_back_porch: 4
    vsync_front_porch: 4
    vsync_pulse_width: 4
    data_pins:
      red:
        - 1         #r3
        - 2         #r4
        - 42        #r5
        - 41        #r6
        - 40        #r7
      blue:
        - 14        #b3
        - 38        #b4
        - 18        #b5
        - 17        #b6
        - 10        #b7
      green:
        - 39        #g2
        - 0         #g3
        - 45        #g4
        - 48        #g5
        - 47        #g6
        - 21        #g7
    lambda: |-
      int shift_x = (it.get_width()-310)/2;
      int shift_y = (it.get_height()-256)/2;
      for(auto i = 0; i<256; i++) {
        it.horizontal_line(shift_x+  0,i+shift_y,50, my_red.fade_to_white(i));
        it.horizontal_line(shift_x+ 50,i+shift_y,50, my_red.fade_to_black(i));

        it.horizontal_line(shift_x+105,i+shift_y,50, my_green.fade_to_white(i));
        it.horizontal_line(shift_x+155,i+shift_y,50, my_green.fade_to_black(i));

        it.horizontal_line(shift_x+210,i+shift_y,50, my_blue.fade_to_white(i));
        it.horizontal_line(shift_x+260,i+shift_y,50, my_blue.fade_to_black(i));
      }
      it.rectangle(shift_x+ 0, 0+shift_y, shift_x+ 310, 256+shift_y, my_yellow);

color:
  - id: my_blue
    blue: 100%
  - id: my_red
    red: 100%
  - id: my_green
    green: 100%
  - id: my_white
    red: 100%
    blue: 100%
    green: 100%
  - id: my_yellow
    hex: ffff00
1 Like

I loaded your code and the screen is flickering all over the place. There must be something missing.

I tied a few different settings to match this code that is supposed to work but it didn’t help.

The touch screen pin is listed as GPIO4 here.

So I added this code. But that did not seem to do anything

touchscreen:
  platform: gt911
  id: my_touchscreen
  interrupt_pin: GPIO4
  on_touch:
    - lambda: |-
          ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
              touch.x,
              touch.y,
              touch.x_raw,
              touch.y_raw
              );
2 Likes

Using 80MHz seems to get rid of the screen flickering.

psram:
  mode: octal
  speed: 80MHz
1 Like

SenseCAP Indicator would be fantastic if it had a speaker and microphone…

Works for me.

1 Like

After a few flashes/toying with settings I was able to get it to stop flickering too, at least with the RGB BW fill in Real.Problems post.

Tried adding image or graph display components and maybe I missed having to add an include or something for it?

Linking .pioenvs/waveshare44/firmware.elf
/data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/waveshare44/src/esphome/components/display/display.o:(.literal._ZN7esphome7display7Display5graphEiiPNS_5graph5GraphENS_5ColorE+0x0): undefined reference to `esphome::graph::Graph::draw(esphome::display::Display*, unsigned short, unsigned short, esphome::Color)'
/data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/waveshare44/src/esphome/components/display/display.o: in function `esphome::display::Display::graph(int, int, esphome::graph::Graph*, esphome::Color)':
/data/build/waveshare44/src/esphome/components/display/display.cpp:388: undefined reference to `esphome::graph::Graph::draw(esphome::display::Display*, unsigned short, unsigned short, esphome::Color)'
/data/cache/platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/waveshare44/src/main.o:(.literal._Z5setupv+0x208): undefined reference to `vtable for esphome::graph::Graph'
    lambda: |-
      it.graph(10, 20, id(single_wifi_graph));

graph:
  - id: single_wifi_graph
    sensor: wifi_signal_db
    duration: 1h
    width: 151
    height: 51

I stumbled across this PR that implements LVGL natively into esphome thanks to @clydebarrow. Since it hasn’t made it to release yet, you have to reference the external component.

external_components:
  - source: github://pr#6363
    refresh: 0min
    components: [lvgl]

Here is an example code that is working for me:

esphome:
  name: home-display
  friendly_name: Home Display
  platformio_options:
    build_flags: "-DBOARD_HAS_PSRAM"
    board_build.arduino.memory_type: qio_opi
    board_build.flash_mode: dio
    board_upload.maximum_ram_size: 524288

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
      CONFIG_ESP32S3_DATA_CACHE_64KB: y
      CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
      CONFIG_SPIRAM_RODATA: y

external_components:
  - source: github://pr#6363
    refresh: 0min
    components: [lvgl]

psram:
  mode: octal
  speed: 80MHz

# Enable logging
logger:
  level: DEBUG

i2c:
  sda: GPIO08
  scl: GPIO09
  scan: True
  id: bus_a

display:
  - platform: rpi_dpi_rgb
    id: my_display
    auto_clear_enabled: false
    update_interval: never
    color_order: RGB
    pclk_frequency: 14MHz
    dimensions:
      width: 800
      height: 480
    de_pin:
      number: 5
    hsync_pin:
      number: 46
      ignore_strapping_warning: true
    vsync_pin:
      number: 3
      ignore_strapping_warning: true
    pclk_pin: 7
    pclk_inverted: false
    hsync_back_porch: 10 #30
    hsync_front_porch: 20 #210 
    hsync_pulse_width: 10 #30
    vsync_back_porch: 10 #4
    vsync_front_porch: 10 #4
    vsync_pulse_width: 10 #4
    data_pins:
      red:
        - 1         #r3
        - 2         #r4
        - 42        #r5
        - 41        #r6
        - 40        #r7
      blue:
        - 14        #b3
        - 38        #b4
        - 18        #b5
        - 17        #b6
        - 10        #b7
      green:
        - 39        #g2
        - 0         #g3
        - 45        #g4
        - 48        #g5
        - 47        #g6
        - 21        #g7

font:
  - file: "gfonts://Roboto"
    id: chu_nano
    size: 12

touchscreen:
  platform: gt911
  id: my_touch
  interrupt_pin: GPIO4
  on_touch:
    - lambda: |-
          ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
              touch.x,
              touch.y,
              touch.x_raw,
              touch.y_raw
              );

lvgl:
  displays:
    - display_id: my_display
  buffer_size: 25%
  pages:
    - id: clock_page
      widgets:
        - obj: # Clock container
            height: size_content
            width: 800 #240
            align: CENTER
            pad_all: 0
            border_width: 0
            bg_color: 0xFFFFFF
            widgets:
              - meter: # Clock face
                  height: 400 #220
                  width: 400 #220
                  align: center
                  bg_opa: TRANSP
                  text_color: 0x000000
                  scales:
                    - ticks: # minutes scale
                        width: 1
                        count: 61
                        length: 10
                        color: 0x000000
                      range_from: 0
                      range_to: 60
                      angle_range: 360
                      rotation: 270
                      indicators:
                        - line:
                            id: minute_hand
                            width: 3
                            color: 0xa6a6a6
                            r_mod: -4
                            value: 0
                    - ticks: # hours scale
                        width: 1
                        count: 12
                        length: 1
                        major:
                          stride: 1
                          width: 4
                          length: 8
                          color: 0xC0C0C0
                          label_gap: 12
                      angle_range: 330
                      rotation: 300
                      range_from: 1
                      range_to: 12
                    - indicators:
                        - line:
                            id: hour_hand
                            width: 5
                            color: 0xa6a6a6
                            r_mod: -30
                            value: 0
                      angle_range: 360
                      rotation: 270
                      range_from: 0
                      range_to: 720

time:
  - platform: homeassistant
    id: time_comp

interval:
  - interval: 30s
    then:
      if:
        condition:
          time.has_time:
        then:
          - script.execute: time_update

script:
  - id: time_update
    then:
      - lvgl.indicator.update:
          id: minute_hand
          value: !lambda |-
            return id(time_comp).now().minute;
      - lvgl.indicator.update:
          id: hour_hand
          value: !lambda |-
            auto now = id(time_comp).now();
            return std::fmod(now.hour, 12) * 60 + now.minute;
2 Likes

has anyone had any luck with this device?

Yes, the display is supported in the current ESPHome release: RPI_DPI_RGB Display Driver — ESPHome

You realistically need to use LVGL, the ESPHome display drawing operations are too slow for the size of the screen, and LVGL is still in PR, but usable as an external component. See LVGL implementation for ESPHome by clydebarrow · Pull Request #6363 · esphome/esphome · GitHub

3 Likes