mirror of
https://github.com/esphome/esphome.git
synced 2025-09-23 21:52:23 +01:00
Add some components to the new testing framework (X,Y,Z) (#6233)
This commit is contained in:
33
tests/components/xpt2046/test.esp8266.yaml
Normal file
33
tests/components/xpt2046/test.esp8266.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
miso_pin: 12
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: 15
|
||||
dc_pin: 4
|
||||
reset_pin: 5
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: 0
|
||||
interrupt_pin: 16
|
||||
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]
|
Reference in New Issue
Block a user