WT32-sc01 Plus /ESP32-S3 ESP HOME

Nice work. Is that the plastic screen protector still on the front :joy:

1 Like

Are you supposed to remove them? :sob:

Yes
Sorry… :rofl:

Have there been any recent changes to this (or integration now into ESPHome finalised).

I’ve been using the code above, but now getting an error on 2024.12.0b2

src/esphome/components/i80/i80_esp_idf.cpp:94:16: error: 'esphome::i80::I80Delegate* esphome::i80::I80BusIdf::get_delegate(esphome::GPIOPin*, uint32_t)' marked 'override', but does not override
   94 |   I80Delegate *get_delegate(GPIOPin *cs_pin, uint32_t data_rate) override {
      |                ^~~~~~~~~~~~
src/esphome/components/i80/i80_esp_idf.cpp: In member function 'virtual void esphome::i80::I80Component::setup()':
src/esphome/components/i80/i80_esp_idf.cpp:123:75: error: invalid new-expression of abstract class type 'esphome::i80::I80BusIdf'
  123 |   auto *bus = new I80BusIdf(this->wr_pin_, this->dc_pin_, this->data_pins_);  // NOLINT
      |                                                                           ^
src/esphome/components/i80/i80_esp_idf.cpp:73:7: note:   because the following virtual functions are pure within 'esphome::i80::I80BusIdf':
   73 | class I80BusIdf : public I80Bus {
      |       ^~~~~~~~~
In file included from src/esphome/components/i80/i80_esp_idf.cpp:1:
src/esphome/components/i80/i80_component.h:45:24: note:     'virtual esphome::i80::I80Delegate* esphome::i80::I80Bus::get_delegate(esphome::GPIOPin*, unsigned int)'
   45 |   virtual I80Delegate *get_delegate(GPIOPin *cs_pin, unsigned int data_rate) = 0;
      |                        ^~~~~~~~~~~~
*** [.pioenvs/alarmpanelpro/src/esphome/components/i80/i80_esp_idf.cpp.o] Error 1

Recent? No. But the gist linked above was out of date, specifically the external components block:

external_components:
  - source: github://EmbedMe-io/embedme
    components: [i80, io_bus, ili9xxx, spi]
    refresh: 1d
2 Likes

Appears we have some breaking changes that have come about in the latest update of ESPHome that stop this method from working. Does anyone have an update to these errors.

Compiling .pioenvs/dashboardmini/src/esphome/components/i80/i80_esp_idf.cpp.o
In file included from src/esphome/components/i80/i80_component.h:8,
                 from src/esphome/components/i80/i80_component.cpp:1:
src/esphome/components/io_bus/io_bus.h:26:46: error: invalid new-expression of abstract class type 'esphome::io_bus::NullPin'
   26 | static GPIOPin *const NULL_PIN = new NullPin();  // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
      |                                              ^
src/esphome/components/io_bus/io_bus.h:12:7: note:   because the following virtual functions are pure within 'esphome::io_bus::NullPin':
   12 | class NullPin : public GPIOPin {
      |       ^~~~~~~
In file included from src/esphome/components/i80/i80_component.h:6:
src/esphome/core/gpio.h:61:23: note:     'virtual esphome::gpio::Flags esphome::GPIOPin::get_flags() const'
   61 |   virtual gpio::Flags get_flags() const = 0;
      |                       ^~~~~~~~~
Compiling .pioenvs/dashboardmini/src/esphome/components/ili9xxx/ili9xxx_display.cpp.o
*** [.pioenvs/dashboardmini/src/esphome/components/i80/i80_component.cpp.o] Error 1
In file included from src/esphome/components/i80/i80_component.h:8,
                 from src/esphome/components/i80/i80_esp_idf.cpp:1:
src/esphome/components/io_bus/io_bus.h:26:46: error: invalid new-expression of abstract class type 'esphome::io_bus::NullPin'
   26 | static GPIOPin *const NULL_PIN = new NullPin();  // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
      |                                              ^
src/esphome/components/io_bus/io_bus.h:12:7: note:   because the following virtual functions are pure within 'esphome::io_bus::NullPin':
   12 | class NullPin : public GPIOPin {
      |       ^~~~~~~
In file included from src/esphome/components/i80/i80_component.h:6:
src/esphome/core/gpio.h:61:23: note:     'virtual esphome::gpio::Flags esphome::GPIOPin::get_flags() const'
   61 |   virtual gpio::Flags get_flags() const = 0;
      |                       ^~~~~~~~~
*** [.pioenvs/dashboardmini/src/esphome/components/i80/i80_esp_idf.cpp.o] Error 1
In file included from src/esphome/components/ili9xxx/ili9xxx_display.h:2,
                 from src/esphome/components/ili9xxx/ili9xxx_display.cpp:1:
src/esphome/components/io_bus/io_bus.h:26:46: error: invalid new-expression of abstract class type 'esphome::io_bus::NullPin'
   26 | static GPIOPin *const NULL_PIN = new NullPin();  // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
      |                                              ^
src/esphome/components/io_bus/io_bus.h:12:7: note:   because the following virtual functions are pure within 'esphome::io_bus::NullPin':
   12 | class NullPin : public GPIOPin {
      |       ^~~~~~~
In file included from src/esphome/components/io_bus/io_bus.h:4:
src/esphome/core/gpio.h:61:23: note:     'virtual esphome::gpio::Flags esphome::GPIOPin::get_flags() const'
   61 |   virtual gpio::Flags get_flags() const = 0;
      |                       ^~~~~~~~~
*** [.pioenvs/dashboardmini/src/esphome/components/ili9xxx/ili9xxx_display.cpp.o] Error 1
========================== [FAILED] Took 6.43 seconds ==========================

I have also tried to work around this by using what I believe to be the next wave of these changes making it into main…

external_components:
  - source: github://pr#8230
    components: [ ili9xxx ]
  - source: github://pr#8227
    components: [ io_bus ]
  - source: github://pr#8228
    components: [ i80 ]
  - source: github://pr#8229
    components: [ spi ]

While this does allow me to compile without errors I cannot get the display to work as it was before. Now it stays on the Default screen for lvgl.

Any help would be greatly appreciated while this still isnt released.

This is a complete working config.

esphome:
  name: wt32-sc01-plus
  name_add_mac_suffix: false
  project:
    name: esphome.w32-sc01-plus
    version: "1.1"
  platformio_options:
    build_unflags: -Werror=all
    board_build.flash_mode: dio

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf
    platform_version: 6.9.0
    version: 5.3.1
    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#8230
    components: [i80, io_bus, ili9xxx, spi]
    refresh: 1h

logger:

power_supply:
  - id: backlight
    enable_on_boot: true
    pin:
      ignore_strapping_warning: true
      number: GPIO45

i80:
  dc_pin:
    ignore_strapping_warning: true
    number: 0
  data_pins:
    - 9
    - ignore_strapping_warning: true
      number: 46
    - ignore_strapping_warning: true
      number: 3
    - 8
    - 18
    - 17
    - 16
    - 15
  wr_pin: 47


i2c:
  frequency: 400kHz
  sda: 6
  scl: 5
touchscreen:
  - platform: ft63x6
    id: my_touchscreen
    interrupt_pin: 7
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: true

psram:
  speed: 80MHz

display:
  - platform: ili9xxx
    bus_type: i80
    id: w32_disp
    model: st7796
    dimensions:
      width: 480
      height: 320
    transform:
      mirror_y: true
      mirror_x: true
      swap_xy: true
    reset_pin: 4
    data_rate: 8MHz
    color_order: bgr
    invert_colors: true
    auto_clear_enabled: false
    update_interval: never
    show_test_card: false

lvgl:
  # Will show a "hello world" page as is. Add your LVGL config here.
3 Likes

That got me back up and running thanks clydebarrow!

I tried loading this config to my WT32-SC01-PLUS, but I’m getting this error. Any ideas?
I currently have ha_deck installed. But, I would prefer a native LVGL implementation.

Compiling .pioenvs/hottub-controller/src/esphome/components/ili9xxx/ili9xxx_display.cpp.o
In file included from src/esphome/components/ili9xxx/ili9xxx_display.h:2,
                 from src/esphome/components/ili9xxx/ili9xxx_display.cpp:1:
src/esphome/components/io_bus/io_bus.h:24:15: error: 'esphome::gpio::Flags esphome::io_bus::NullPin::get_flags() const' marked 'override', but does not override
   24 |   gpio::Flags get_flags() const override { return gpio::Flags{}; }
      |               ^~~~~~~~~
In file included from src/esphome/components/i80/i80_component.h:8,
                 from src/esphome/components/i80/i80_component.cpp:1:
src/esphome/components/io_bus/io_bus.h:24:15: error: 'esphome::gpio::Flags esphome::io_bus::NullPin::get_flags() const' marked 'override', but does not override
   24 |   gpio::Flags get_flags() const override { return gpio::Flags{}; }
      |               ^~~~~~~~~
In file included from src/esphome/components/i80/i80_component.h:8,
                 from src/esphome/components/i80/i80_esp_idf.cpp:1:
src/esphome/components/io_bus/io_bus.h:24:15: error: 'esphome::gpio::Flags esphome::io_bus::NullPin::get_flags() const' marked 'override', but does not override
   24 |   gpio::Flags get_flags() const override { return gpio::Flags{}; }
      |               ^~~~~~~~~
*** [.pioenvs/hottub-controller/src/esphome/components/i80/i80_component.cpp.o] Error 1
*** [.pioenvs/hottub-controller/src/esphome/components/i80/i80_esp_idf.cpp.o] Error 1
*** [.pioenvs/hottub-controller/src/esphome/components/ili9xxx/ili9xxx_display.cpp.o] Error 1
========================= [FAILED] Took 436.60 seconds =========================

It would seem you are using an older version of ESPHome. Upgrade to 2025.2.

That was it. Now it builds and loads. :grin:

1 Like

I give a try to this. I was using the previous version from
- source: github://EmbedMe-io/embedme
but then I have this error:

Failed config

external_components: [source /config/esphome/plate-salon.yaml:102]
  - source: github://pr#8230
    components: 
      
      Could not find __init__.py file for component i80. Please check the component is defined by this source (search path: /data/external_components/2e185987/esphome/components/i80/__init__.py).
      - i80
      - io_bus
      - ili9xxx
      - spi
    refresh: 1h

What did I miss?

Is it normal that the Hello World demo that is displayed by default shows stripes on the display? I know someone above stated it went away after a second flash. But not so in my case. Or is it because I reinstalled OTA instead of using the USB Serial interface? My original install was with the USB Serial interface since the partitioning needed to by modified as mentioned further up. Strange enough with the ha-deck implementation the partitioning was slightly different. So, I changed it to the above mentioned partitioning just to be sure.

I success by using ESPHome Device Builder (dev) and also refresh: 0s in external_components:

external_components:
  - source: github://pr#8230
    components: [i80, io_bus, ili9xxx, spi]
    refresh: 0s

But then I also see what @sh-guy report in his last message about “stripes on the display”.

No. Show a screenshot and your YAML.

Here is what I get with this:

wifi:
  networks:
    - ssid: !secret wifi_ssid_free
      password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${friendly_name} Fallback Hotspot"
    password: !secret wifi_ap_password

captive_portal:

substitutions:
  devicename: plate-salon
  friendly_name: Plate salon

esphome:
  name: ${devicename}
  friendly_name: ${friendly_name}
  platformio_options:
    build_unflags: -Werror=all
    board_build.flash_mode: dio

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf
    platform_version: 6.9.0
    version: 5.3.1
    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#8230
    components: [i80, io_bus, ili9xxx, spi]
    refresh: 0s

# Enable logging
logger:
  logs:
    component: ERROR

ota:
  - platform: esphome
    password: !secret ota_password

power_supply:
  - id: backlight
    enable_on_boot: true
    pin:
      ignore_strapping_warning: true
      number: GPIO45

i80:
  dc_pin:
    ignore_strapping_warning: true
    number: 0
  data_pins:
    - 9
    - ignore_strapping_warning: true
      number: 46
    - ignore_strapping_warning: true
      number: 3
    - 8
    - 18
    - 17
    - 16
    - 15
  wr_pin: 47

i2c:
  frequency: 400kHz
  sda: 6
  scl: 5

touchscreen:
  - platform: ft63x6
    id: my_touchscreen
    interrupt_pin: 7
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: true

psram:
  speed: 80MHz

display:
  - platform: ili9xxx
    bus_type: i80
    id: w32_disp
    model: ST7796
    dimensions:
      width: 480
      height: 320
    transform:
      mirror_y: true
      mirror_x: true
      swap_xy: true
    reset_pin: GPIO4
    data_rate: 8MHz
    color_order: bgr
    invert_colors: true
    auto_clear_enabled: false
    update_interval: never
    show_test_card: false

lvgl:
  # Will show a "hello world" page as is. Add your LVGL config here.

You might try the following in the display:
data_rate: 4MHz

They suggest 8MHz, but I see fewer issues with 4MHz

I have done some more testing and I now know what’s failing - one command to the display chip is sometimes being ignored or mis-interpreted. Sending it twice seems to fix it.

So I have pushed an update to the PR with this work-around. Try it again making sure you get the updated code (remove the .esphome directory if required.)

Hello,

I give a try with your last modification and it’s much better! Thank you already for this.

I do no see any red stripes over the full screen. But still see sometime some glitches on the spinner.

Here in green:

Also FYI, I updated my config (edited in my post bellow too) to match your config. Tell me if there is something still not correct with your default config.

Yes, I’m also seeing small glitches. It appears to be something to do with PSRAM, probably DMA. I’m looking into the cause but at this stage I think it’s a problem with the ESP-IDF library code.