From 530e701250d6fc804e4c203f861e1218b65bc6fa Mon Sep 17 00:00:00 2001 From: Kyle Gordon Date: Tue, 3 Dec 2024 22:28:11 +0000 Subject: [PATCH] Untested calibrations --- esphome/ili9341_1.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/esphome/ili9341_1.yaml b/esphome/ili9341_1.yaml index 26e28a39..c3ff9a09 100644 --- a/esphome/ili9341_1.yaml +++ b/esphome/ili9341_1.yaml @@ -233,14 +233,19 @@ touchscreen: id: toucharea cs_pin: GPIO12 interrupt_pin: GPIO16 - # on_touch: - # - lambda: |- - # ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%d", - # id(toucharea).x, - # id(toucharea).y, - # id(toucharea).x_raw, - # id(toucharea).y_raw - # ); + calibration: + x_min: 0 + x_max: 240 + y_min: 0 + y_max: 320 + 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 + ); display: - id: my_display