1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Updating the touchscreen interface structure (#4596)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: NP v/d Spek <github_mail@lumensoft.nl>
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
Co-authored-by: Gustavo Ambrozio <gustavo@gustavo.eng.br>
This commit is contained in:
NP v/d Spek
2023-12-12 23:56:01 +01:00
committed by GitHub
parent 8e92bb7958
commit c6dc336c4a
35 changed files with 997 additions and 836 deletions

View File

@@ -464,6 +464,7 @@ binary_sensor:
sx1509: sx1509_hub
number: 3
- platform: touchscreen
touchscreen_id: lilygo_touchscreen
id: touch_key1
@@ -483,6 +484,7 @@ binary_sensor:
pin:
max6956: max6956_1
number: 4
mode:
input: true
pullup: true
@@ -506,6 +508,7 @@ binary_sensor:
input: true
inverted: false
climate:
- platform: tuya
id: tuya_climate
@@ -595,6 +598,8 @@ display:
it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green);
it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue);
it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red);
auto touch = id(ft63_touchscreen)->get_touch();
if (touch) { ESP_LOGD("touch", "%d/%d", touch.value().x, touch.value().y); }
rotation: 0°
update_interval: 16ms
@@ -677,53 +682,53 @@ display:
update_interval: 60s
display_data_1_pin:
number: 5
number: GPIO5
allow_other_uses: true
display_data_2_pin:
number: 18
number: GPIO18
allow_other_uses: true
display_data_3_pin:
number: 19
number: GPIO19
allow_other_uses: true
display_data_5_pin:
number: 25
number: GPIO25
allow_other_uses: true
display_data_4_pin:
number: 23
number: GPIO23
allow_other_uses: true
display_data_6_pin:
number: 26
number: GPIO26
allow_other_uses: true
display_data_7_pin:
number: 27
number: GPIO27
allow_other_uses: true
ckv_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
sph_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
gmod_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
gpio0_enable_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
oe_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
spv_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
powerup_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
wakeup_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
vcom_pin:
allow_other_uses: true
number: GPIO1
allow_other_uses: true
number:
- platform: tuya
@@ -816,21 +821,16 @@ esp32_camera:
allow_other_uses: true
- number: GPIO35
allow_other_uses: true
-
number: GPIO34
-
number: GPIO5
- number: GPIO34
- number: GPIO5
allow_other_uses: true
-
number: GPIO39
-
number: GPIO18
- number: GPIO39
allow_other_uses: true
-
number: GPIO36
- number: GPIO18
allow_other_uses: true
-
number: GPIO19
- number: GPIO36
allow_other_uses: true
- number: GPIO19
allow_other_uses: true
vsync_pin:
allow_other_uses: true
@@ -910,18 +910,16 @@ touchscreen:
spi_id: spi_id_2
cs_pin:
allow_other_uses: true
number: 17
number: GPIO17
interrupt_pin:
number: 16
number: GPIO16
display: inkplate_display
update_interval: 50ms
report_interval: 1s
threshold: 400
calibration_x_min: 3860
calibration_x_max: 280
calibration_y_min: 340
calibration_y_max: 3860
swap_x_y: false
on_touch:
- logger.log:
format: Touch at (%d, %d)
@@ -938,10 +936,25 @@ touchscreen:
format: Touch at (%d, %d)
args: [touch.x, touch.y]
- platform: gt911
interrupt_pin: GPIO3
interrupt_pin:
number: GPIO3
display: inkplate_display
- platform: ft63x6
id: ft63_touchscreen
interrupt_pin:
allow_other_uses: true
number: GPIO39
reset_pin:
allow_other_uses: true
number: GPIO5
display: inkplate_display
on_touch:
- logger.log:
format: Touch at (%d, %d)
args: [touch.x, touch.y]
i2s_audio:
i2s_lrclk_pin:
allow_other_uses: true

View File

@@ -54,6 +54,7 @@ spi_device:
display:
- platform: ili9xxx
id: displ8
model: ili9342
cs_pin: GPIO5
dc_pin: GPIO4
@@ -67,6 +68,7 @@ i2c:
touchscreen:
- platform: tt21100
display: displ8
interrupt_pin:
number: GPIO3
ignore_strapping_warning: true