esphome/tests/components/xpt2046/test.esp32-c3.yaml

34 lines
667 B
YAML
Raw Normal View History

spi:
- id: spi_xpt2046
clk_pin: 6
mosi_pin: 7
miso_pin: 5
display:
- platform: ili9xxx
id: xpt_display
dimensions: 320x240
model: TFT 2.4
cs_pin: 8
dc_pin: 9
reset_pin: 10
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
touchscreen:
- platform: xpt2046
id: xpt_touchscreen
cs_pin: 4
interrupt_pin: 3
display: xpt_display
update_interval: 50ms
threshold: 400
calibration_x_min: 3860
calibration_x_max: 280
calibration_y_min: 340
calibration_y_max: 3860
on_touch:
- logger.log:
format: Touch at (%d, %d)
args: [touch.x, touch.y]