mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 10:12:52 +00:00
Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@home-assistant.io>
28 lines
562 B
YAML
28 lines
562 B
YAML
display:
|
|
- platform: mipi_spi
|
|
model: ILI9341
|
|
id: ns_display
|
|
dc_pin: ${dc_pin}
|
|
cs_pin: ${cs_pin}
|
|
color_depth: 8
|
|
invert_colors: false
|
|
lambda: |-
|
|
it.rectangle(0, 0, it.get_width(), it.get_height());
|
|
|
|
touchscreen:
|
|
- platform: ns2009
|
|
id: ns_touchscreen
|
|
i2c_id: i2c_bus
|
|
display: ns_display
|
|
transform:
|
|
mirror_y: true
|
|
calibration:
|
|
x_min: 400
|
|
x_max: 3700
|
|
y_min: 300
|
|
y_max: 3700
|
|
on_touch:
|
|
- logger.log:
|
|
format: Touch at (%d, %d)
|
|
args: [touch.x, touch.y]
|