mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 16:38:16 +01:00
35 lines
676 B
YAML
35 lines
676 B
YAML
spi:
|
|
- id: spi_xpt2046
|
|
clk_pin: 16
|
|
mosi_pin: 17
|
|
miso_pin: 15
|
|
|
|
display:
|
|
- platform: ili9xxx
|
|
id: xpt_display
|
|
dimensions: 320x240
|
|
model: TFT 2.4
|
|
cs_pin: 13
|
|
dc_pin: 14
|
|
reset_pin: 21
|
|
invert_colors: false
|
|
lambda: |-
|
|
it.rectangle(0, 0, it.get_width(), it.get_height());
|
|
|
|
touchscreen:
|
|
- platform: xpt2046
|
|
id: xpt_touchscreen
|
|
cs_pin: 18
|
|
interrupt_pin: 19
|
|
display: xpt_display
|
|
update_interval: 50ms
|
|
threshold: 400
|
|
calibration:
|
|
x_min: 3860
|
|
x_max: 280
|
|
y_min: 340
|
|
y_max: 3860
|
|
on_touch:
|
|
- logger.log:
|
|
format: Touch at (%d, %d)
|
|
args: [touch.x, touch.y]
|