diff --git a/components/touchscreen/images/esp32-s3-box.png b/components/touchscreen/images/esp32-s3-box.png new file mode 100644 index 000000000..d3ed24b23 Binary files /dev/null and b/components/touchscreen/images/esp32-s3-box.png differ diff --git a/components/touchscreen/images/esp32-s3-korvo-2.png b/components/touchscreen/images/esp32-s3-korvo-2.png new file mode 100644 index 000000000..034e6a504 Binary files /dev/null and b/components/touchscreen/images/esp32-s3-korvo-2.png differ diff --git a/components/touchscreen/index.rst b/components/touchscreen/index.rst index 8e3e463ef..2357f646b 100644 --- a/components/touchscreen/index.rst +++ b/components/touchscreen/index.rst @@ -81,6 +81,7 @@ See Also - :doc:`Inkplate 6 Plus ` - :doc:`EKTF2232 ` - :doc:`XPT2046 ` +- :doc:`TT21100 ` - :apiref:`touchscreen/touchscreen.h` - :apiref:`touchscreen/binary_sensor/touchscreen_binary_sensor.h` - :ghedit:`Edit` diff --git a/components/touchscreen/tt21100.rst b/components/touchscreen/tt21100.rst new file mode 100644 index 000000000..3dab3eb76 --- /dev/null +++ b/components/touchscreen/tt21100.rst @@ -0,0 +1,85 @@ +TT21100 Touch Screen Controller +=============================== + +.. seo:: + :description: Instructions for setting up TT21100 touch screen controller with ESPHome + :image: esp32-s3-korvo-2-lcd.png + :keywords: TT21100, ESP32-S3-BOX, ESP32-S3-Korvo-2-LCD + +The ``tt21100`` touchscreen platform allows using the touch screen controllers based on the TT21100 chip with ESPHome. +The :ref:`I²C ` is required to be set up in your configuration for this touchscreen to work. + +This controller is used in the Espressif ESP32-S3-BOX and the ESP32-S3-Korvo-2-LCD extension board for the ESP32-S3-Korvo-2. + +.. figure:: images/esp32-s3-box.png + :align: center + :width: 50.0% + + TT21100 touchscreen on ESP32-S3-BOX + +.. figure:: images/esp32-s3-korvo-2.png + :align: center + :width: 50.0% + + TT21100 touchscreen on ESP32-S3-Korvo-2 + +Base Touchscreen Configuration +------------------------------ + +.. code-block:: yaml + + # Example configuration entry + touchscreen: + platform: tt21100 + id: my_touchscreen + interrupt_pin: GPIO3 + reset_pin: GPIO48 + +Configuration variables: +************************ + +- **id** (*Optional*, :ref:`config-id`): Manually set the ID of this touchscreen. +- **interrupt_pin** (*Required*, :ref:`Pin Schema `): The touch detection pin. +- **reset_pin** (*Optional*, :ref:`Pin Schema `): The reset pin of the controller. + +- All other options from :ref:`Touchscreen `. + +.. warning:: + + If the reset pin is shared between the display and TT21100 touchscreen + (as is the case for the ESP32-S3-BOX and the ESP32-S3-Korvo-2-LCD), + only configure the reset pin for the display and remove the **reset_pin** variable for the TT21100 touchscreen. + The display component should be initialized before the touchscreen component, which has then already performed the reset. + +Additional Buttons +------------------ + +In addition to touch areas on the screen configured through the :ref:`Touchscreen ` component, +the TT21100 supports up to four buttons located outside of the normal touchscreen area. +On the ESP32-S3-BOX and the ESP32-S3-Korvo-2-LCD, the red circle below the display is such a button. +A binary sensor can be configured to react to touching these buttons. + +.. code-block:: yaml + + # Example configuration entry + binary_sensor: + - platform: tt21100 + name: "Home" + index: 0 + +Configuration variables: +************************ + +- **tt21100_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the touchscreen. +- **index** (**Required**, int): Internal index of the touch button, between 0 and 3. + +- All other options from :ref:`Binary Sensor `. + + +See Also +-------- + +- :ref:`Binary Sensor Filters ` +- :apiref:`tt21100/touchscreen/tt21100.h` +- :apiref:`tt21100/binary_sensor/tt21100_button.h` +- :ghedit:`Edit` diff --git a/images/esp32-s3-korvo-2-lcd.png b/images/esp32-s3-korvo-2-lcd.png new file mode 100644 index 000000000..224f66b71 Binary files /dev/null and b/images/esp32-s3-korvo-2-lcd.png differ diff --git a/index.rst b/index.rst index 1b6e20d54..5567ae5f6 100644 --- a/index.rst +++ b/index.rst @@ -462,6 +462,7 @@ Touchscreen Nextion Binary Sensor, components/binary_sensor/nextion, nextion.jpg Touchscreen, components/touchscreen/index, touch.svg, dark-invert + TT21100, components/touchscreen/tt21100, esp32-s3-korvo-2-lcd.png XPT2046, components/binary_sensor/xpt2046, xpt2046.jpg Miscellaneous @@ -633,6 +634,7 @@ Touchscreen Components Touchscreen Core, components/touchscreen/index, folder-open.svg, dark-invert EKTF2232, components/touchscreen/ektf2232, ektf2232.svg, Inkplate 6 Plus Lilygo T5 4.7", components/touchscreen/lilygo_t5_47, lilygo_t5_47_touch.jpg + TT21100, components/touchscreen/tt21100, esp32-s3-korvo-2-lcd.png Cover Components ----------------