Hello to all.
I’m testing a touch display ili9844 320x480 with ft6236 and ns2009 i2c chip.
Now I’m trying to calibrate touch but I’ve noticed some strange behaviors.
First of all there is not clear to me if is better use rotation or calibration in display configuration and if touchscreen calibration must respect the same swap and mirror of display conf, and if in touchscreen calibration I have to consider x and y or x_raw and y_raw, because the log return me the same max and min value although I’m still checking the coordinate mirroring.
But the most important problem is the touch operation:
If I’m connected to the display with a USB cable and enable log, I can see the coordinates as expected by the lambda in the script, while if enable the wirless log, I see the boot or a possible reboot but no debug log. This is also true if I connect an external power supply and I’m not connected to the UART, the touchscreen doesn’t work and the log doesn’t exist.
this is my test yaml file:
esphome:
name: display
friendly_name: display
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
encryption:
key: "ufcJZA2KxwBTz2b4zkqt6KdohpLgMYCazcQvTg5FrcI="
ota:
- platform: esphome
password: "342bc2dd6d6c5addbc692aaede7dc9e7"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Display Fallback Hotspot"
password: "kkkna2K08Qct"
captive_portal:
i2c:
- id: touch_bus
sda: GPIO26
scl: GPIO27
sda_pullup_enabled: False
scl_pullup_enabled: False
scan: True
spi:
clk_pin: GPIO14
mosi_pin: GPIO13
miso_pin: GPIO12
color:
- id: my_red
red: 100%
green: 3%
blue: 5%
lvgl:
displays: my_display
touchscreens: my_touch
display:
- platform: mipi_spi
cs_pin: 15
dc_pin: 33
model: ILI9488
invert_colors: false
show_test_card: False
dimensions:
height: 320
width: 480
# rotation: 90
transform:
swap_xy: True
mirror_x: false
mirror_y: false
auto_clear_enabled: false
update_interval: never
id: my_display
touchscreen:
- platform: ft63x6
i2c_id: touch_bus
id: my_touch
display: my_display
interrupt_pin: GPIO0
# calibration:
# x_min: 0
# x_max: 479
# y_min: 0
# y_max: 319
transform:
swap_xy: True
mirror_x: False
mirror_y: True
on_touch:
- lambda: |-
ESP_LOGD("Touch", "Touched at x=%d, y=%d, x_raw=%d, y_raw=%d", touch.x, touch.y, touch.x_raw, touch.y_raw);
and this the validate:
INFO ESPHome 2025.11.1
INFO Reading configuration /config/esphome/display.yaml...
WARNING GPIO12 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 https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO No pages or widgets configured, creating default hello_world page
WARNING GPIO15 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 https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO0 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 https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
esphome:
name: display
friendly_name: display
min_version: 2025.11.1
build_path: build/display
platformio_options: {}
environment_variables: {}
includes: []
includes_c: []
libraries: []
name_add_mac_suffix: false
debug_scheduler: false
areas: []
devices: []
esp32:
board: esp32dev
framework:
type: esp-idf
version: 5.5.1
sdkconfig_options: {}
log_level: ERROR
advanced:
compiler_optimization: SIZE
enable_idf_experimental_features: false
enable_lwip_assert: true
ignore_efuse_custom_mac: false
ignore_efuse_mac_crc: false
enable_lwip_mdns_queries: true
enable_lwip_bridge_interface: false
enable_lwip_tcpip_core_locking: true
enable_lwip_check_thread_safety: true
disable_libc_locks_in_iram: true
disable_vfs_support_termios: true
disable_vfs_support_select: true
disable_vfs_support_dir: true
execute_from_psram: false
loop_task_stack_size: 8192
components: []
platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.31-2/platform-espressif32.zip
source: pioarduino/framework-espidf@https://github.com/pioarduino/esp-idf/releases/download/v5.5.1/esp-idf-v5.5.1.tar.xz
flash_size: 4MB
variant: ESP32
cpu_frequency: 160MHZ
logger:
level: DEBUG
baud_rate: 115200
tx_buffer_size: 512
deassert_rts_dtr: false
task_log_buffer_size: 768
hardware_uart: UART0
logs: {}
runtime_tag_levels: false
api:
encryption:
key: ufcJZA2KxwBTz2b4zkqt6KdohpLgMYCazcQvTg5FrcI=
port: 6053
password: ''
reboot_timeout: 15min
batch_delay: 100ms
custom_services: false
homeassistant_services: false
homeassistant_states: false
listen_backlog: 4
max_connections: 8
max_send_queue: 8
ota:
- platform: web_server
- platform: esphome
password: 342bc2dd6d6c5addbc692aaede7dc9e7
version: 2
port: 3232
wifi:
ap:
ssid: Display Fallback Hotspot
password: kkkna2K08Qct
ap_timeout: 90s
domain: .local
reboot_timeout: 15min
power_save_mode: LIGHT
fast_connect: false
enable_btm: false
enable_rrm: false
passive_scan: false
enable_on_boot: true
min_auth_mode: WPA2
networks:
- ssid: ******************
password: **************
priority: 0
use_address: display.local
captive_portal: {}
i2c:
- id: touch_bus
sda: 26
scl: 27
sda_pullup_enabled: false
scl_pullup_enabled: false
scan: true
frequency: 50000.0
spi:
- clk_pin:
number: 14
mode:
output: true
input: false
open_drain: false
pullup: false
pulldown: false
inverted: false
ignore_pin_validation_error: false
ignore_strapping_warning: false
drive_strength: 20.0
mosi_pin:
number: 13
mode:
output: true
input: false
open_drain: false
pullup: false
pulldown: false
inverted: false
ignore_pin_validation_error: false
ignore_strapping_warning: false
drive_strength: 20.0
miso_pin:
number: 12
mode:
input: true
output: false
open_drain: false
pullup: false
pulldown: false
inverted: false
ignore_pin_validation_error: false
ignore_strapping_warning: false
drive_strength: 20.0
interface: any
type: single
interface_index: 0
color:
- id: my_red
red: 1.0
green: 0.03
blue: 0.05
lvgl:
- displays:
- my_display
touchscreens:
- touchscreen_id: my_touch
long_press_time: 400ms
long_press_repeat_time: 100ms
update_interval: 1s
color_depth: 16
default_font: montserrat_14
full_refresh: false
draw_rounding: 2
buffer_size: 0.0
log_level: WARN
byte_order: big_endian
page_wrap: true
transparency_key: 1024
encoders: []
keypads: []
resume_on_input: true
widgets:
.....
[ HERE THE WIDGET OF LVGL EMPTY CONFIGURATION]
.....
display:
- platform: mipi_spi
cs_pin:
number: 15
mode:
output: true
input: false
open_drain: false
pullup: false
pulldown: false
inverted: false
ignore_pin_validation_error: false
ignore_strapping_warning: false
drive_strength: 20.0
dc_pin:
number: 33
mode:
output: true
input: false
open_drain: false
pullup: false
pulldown: false
inverted: false
ignore_pin_validation_error: false
ignore_strapping_warning: false
drive_strength: 20.0
model: ILI9488
invert_colors: false
show_test_card: false
dimensions:
height: 320
width: 480
offset_height: 0
offset_width: 0
transform:
swap_xy: true
mirror_x: false
mirror_y: false
auto_clear_enabled: false
update_interval: 4294967295
id: my_display
bus_mode: single
data_rate: 10000000.0
spi_mode: MODE0
color_order: BGR
byte_order: big_endian
color_depth: '16'
draw_rounding: 2
pixel_mode: 18bit
use_axis_flips: false
spi_16: false
touchscreen:
- platform: ft63x6
i2c_id: touch_bus
id: my_touch
display: my_display
interrupt_pin:
number: 0
mode:
input: true
output: false
open_drain: false
pullup: false
pulldown: false
inverted: false
ignore_pin_validation_error: false
ignore_strapping_warning: false
drive_strength: 20.0
transform:
swap_xy: true
mirror_x: false
mirror_y: true
on_touch:
then:
- lambda: !lambda |-
ESP_LOGD("Touch", "Touched at x=%d, y=%d, x_raw=%d, y_raw=%d", touch.x, touch.y, touch.x_raw, touch.y_raw);
update_interval: 50ms
address: 0x38
INFO Configuration is valid!
I hope someone can help me because I have other esphome device connected with debug active and I have no problem with them.
thanks in advance