The example in this post works with the recent merge, just remove the external components reference
Hello clydebarrow,
Iām writing to express my sincere gratitude. Iāve been struggling for a while to get my WT32 to work, and I just tried your solution, and it worked like a charm on the first try.
I was so thrilled that I created an account on this forum specifically to leave this comment and thank you personally.
Itās contributions like yours that make the open-source community so amazing. Thank you again for your hard work and for sharing it!
All the best
Thanks alot for clarifying this.
Like you said. The Example works when removing
#external_components:
# - source: github://clydebarrow/esphome@mipi-spi
# components: [spi, mipi_spi, const]
# refresh: 1h
without any problems for now.
I was initially having trouble re-building my esphome code, but Iāve now got that working.
The config posted here is out of date, and instead I used the config posted just up on this thread here:-
With one exception.
This section:-
power_supply:
- id: backlight
enable_on_boot: true
pin:
ignore_strapping_warning: true
number: GPIO45
In my old code was:-
output:
- platform: ledc
id: backlight_pwm
pin:
number: GPIO45
ignore_strapping_warning: true
Which still works, and let me keep control of the backlight using:-
light:
- platform: monochromatic
id: backlight
name: Display Backlight
output: backlight_pwm
restore_mode: ALWAYS_ON
And as mentioned above, you also no longer need the external_components section:-
external_components:
- source: github://clydebarrow/esphome@mipi-spi
components: [spi, mipi_spi, const]
refresh: 1h
Can someone help me please. I have used the last config posted by @clydebarrow but I get a message saying my config is invalid because lvgl: āMust contain at least one of pages, widgetsā. I am unable to leave it blank to get the hello-world message.
I am using the external lvgl component in PR7184. If I donāt put this in, my config cannot find lvgl
Well, thatās not going to work. Youāll need to show your actual config, and the log output for anyone to help.
Make sure you are using the latest ESPHome (or at least a recent version.)
I removed the external components (including yours) and it worked! I did not pick up on your comment somewhere in the thread that it is now incorporated in ESPHome. Thanks for the response and for the great software.
Does anyone have yaml code to enable you to swipe left/right between different pages?
Yes, there is more than one way to achieve that:
- Instead of pages, use a
tileviewthat automatically handles swipes; - Use the
on_swipetrigger to invokelvgl.page.next(and.prev)
Thanks. tileview worked for me.
I did not seem to require the on_swipe trigger - it swiped without it.
Yes, the two options were alternatives;
OTA works if you change psram mode from octal to quad:
psram:
speed: 80MHz
mode: quad
Iām also interested in using de SD card for logging and transfering files with an SD card. Did you manage to get this working?
Is anyone using the speaker?
I would like to buy a speaker which I could directly connect, but what connector is on the board?
Hi @clydebarrow
I was previously using
platform: ili9xxx
bus_type: i80
id: w32_disp
model: st7796
However Iāve now migrated the the new updated version you have helpfully shared here. The only issue I have now is that my icons are just showing as a black box
- file: mdi:clock-time-eight
id: clock_icon
resize: 50x50
type: RGB
Any ideas?
Donāt use RGB for images - itās not supported by LVGL currently, and MDI images have no colour anyway. You will want to use grayscale with alpha_channel and bpp set to at least 2.
- file: mdi:clock-time-eight
id: clock_icon
resize: 50x50
type: RGB565
transparency: alpha_channel
worked for me
Has anyone experienced this issue?
Since ESPHome was updated to 2026.4.0. I had to make a change to my yaml file and now when I try and compile the enclosed yaml file (I have truncated it to the relevant part), I get the following compiler error: " use of ārotationā in the display config is not compatible with LVGL, please set rotation in the LVGL config instead."
However, when I place the rotation key in the LVGL block, it does nothing. There is no rotation.
Can anyone help?
esphome:
name: display-wt32sc01plus
friendly_name: SC01 Plus display
platformio_options:
board_build.flash_mode: qio
on_boot:
priority: -100
then:
- logger.log: "system booted."
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
# flash_size: 8MB
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
CONFIG_ESP_TASK_WDT_TIMEOUT_S: "5" # Increase timeout
logger:
level: DEBUG
logs:
timeout_check: DEBUG
touchscreen: DEBUG
api:
encryption:
key: !secret api_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Static IP configuration
manual_ip:
static_ip: 10.0.0.139
gateway: 10.0.0.1
subnet: 255.255.255.0
dns1: 1.1.1.1
dns2: 8.8.8.8
# Set up i2c ommunications protocol for ESP board
i2c:
frequency: 400kHz
sda: 6
scl: 5
# Set up PSRAM
psram:
# mode: octal ####NB - 'octal' does not work
mode: quad
speed: 80MHz
# Set up touchscreen to awake screen when off
# The FT6336U driver chip is supported natively be ESPHome
touchscreen:
- platform: ft63x6
id: my_touchscreen
interrupt_pin: 7
transform:
swap_xy: true
mirror_y: false
mirror_x: true
# WAKE BACKLIGHT ON TOUCH
on_touch:
# Debug code
- logger.log:
format: "X=%d, Y=%d"
args: [ 'touch.x', 'touch.y' ]
# End debug code
- lambda: 'id(timeout_counter) = 0;' # <--- MODIFIED: Reset the counter on touch
- if:
condition:
light.is_off: backlight
then:
- logger.log: "Touch detected ā waking display"
- light.turn_on: backlight
- lvgl.resume:
- lvgl.widget.redraw:
# Code to turn screen (backlight) on and off
output:
- platform: ledc
id: backlight_pwm
pin:
number: GPIO45 # Hardware pin to control backlight
ignore_strapping_warning: true
frequency: 4000 Hz
inverted: false
light:
- platform: monochromatic
id: backlight
name: "SC01 Backlight"
output: backlight_pwm
icon: mdi:brightness-percent
default_transition_length: 500ms
restore_mode: RESTORE_AND_ON
on_turn_on:
then:
- lvgl.resume
on_turn_off:
then:
- lvgl.pause:
# Code for Serial Peripheral Interface (SPI)
spi:
- type: octal
id: octal_spi
clk_pin: 47
data_pins:
- 9
- ignore_strapping_warning: true
number: 46
- ignore_strapping_warning: true
number: 3
- 8
- 18
- 17
- 16
- 15
# Code for display.
# platform mipi_spi is supported natively by ESPHome
display:
- platform: mipi_spi
id: my_display
model: wt32-sc01-plus
data_rate: 10MHz
lvgl:
rotation: 270
style_definitions:
- { id: tile, bg_opa: 100%, bg_color: 0xFFFFFF, border_width: 2, shadow_width: 0, pad_all: 0 }
- { id: black_bg, bg_color: 0x000000 }
- id: button_style
bg_color: 0x000000
bg_opa: COVER
- id: hot_water_style
bg_color: 0x000000
bg_opa: COVER
- id: header_footer
bg_color: 0x2F8CD8
bg_grad_color: 0x005782
bg_grad_dir: VER
bg_opa: COVER
border_opa: TRANSP
radius: 0
pad_all: 0
pad_row: 0
pad_column: 0
border_color: 0x0077b3
text_color: 0xFFFFFF
width: 100%
height: 30
on_idle:
timeout: !lambda "return (id(display_timeout).state );"
then:
- logger.log: "LVGL is idle"
- light.turn_off: backlight
- lvgl.pause:
Was this discussed in the recent breaking changes release notes for ESPHome? I recollect mention of lvgl changes.
Yes, sorry, I finally found that you need to remove the ātransformā block under the touchscreen because the LVGL rotation does the transformation as well. I was also having trouble getting the device to flash properly but it is sorted now.