diff --git a/components/index.rst b/components/index.rst index 17cdd0481a..3a034fd921 100644 --- a/components/index.rst +++ b/components/index.rst @@ -1062,6 +1062,7 @@ Touchscreen Components Touchscreen Core, components/touchscreen/index, folder-open.svg, dark-invert AXS15231, components/touchscreen/axs15231, axs15231.svg CST226, components/touchscreen/cst226, t4-s3.jpg + CST328, components/touchscreen/cst328, cst328_.jpg CST816, components/touchscreen/cst816, cst816.jpg CHSC6X, components/touchscreen/chsc6x, chsc6x.png EKTF2232, components/touchscreen/ektf2232, ektf2232.svg, Inkplate 6 Plus diff --git a/components/touchscreen/cst328.rst b/components/touchscreen/cst328.rst new file mode 100644 index 0000000000..bb15a72bfc --- /dev/null +++ b/components/touchscreen/cst328.rst @@ -0,0 +1,87 @@ +cst328 Touch Screen Controller +=============================== + +.. seo:: + :description: Instructions for setting up cst328 touch screen controller with ESPHome + :image: cst328_.jpg + :keywords: cst328 + +The ``cst328`` touchscreen platform allows using the touch screen controllers based on the cst328 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 Waveshare ESP32-S3 Touch LCD 2.8 board. + +.. figure:: images/cst328.jpg + :align: center + :width: 50.0% + + cst328 touchscreen on Waveshare ESP32-S3 Touch LCD 2.8 board + +Base Touchscreen Configuration +------------------------------ + +.. code-block:: yaml + + # Example configuration entry + touchscreen: + platform: cst328 + id: my_touchscreen + interrupt_pin: GPIOXX + +Configuration variables: +************************ + +- **id** (*Optional*, :ref:`config-id`): Manually set the ID of this touchscreen. +- **interrupt_pin** (*Optional*, :ref:`Pin Schema `): The touch detection pin. +- **reset_pin** (*Optional*, :ref:`Pin Schema `): The chip reset pin. + +- All other options from :ref:`Touchscreen `. + +Binary Sensor +------------- + +In addition to touch areas on the screen configured through the :ref:`Touchscreen ` component, +a simple binary sensor can be configured to react to touching the screen. + +.. code-block:: yaml + + # Example configuration entry + binary_sensor: + - platform: cst328 + name: "Home" + +Configuration variables: +************************ + +- **cst328_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the touchscreen. + +- All other options from :ref:`Binary Sensor `. + + + +Sample Config +------------- +Waveshare ESP32-S3 Touch LCD 2.8 board +************************************** + +.. code-block:: yaml + + i2c: + - id: touch_i2c + sda: GPIO1 + scl: GPIO3 + frequency: 400kHz + + touchscreen: + - id: my_touchscreen + platform: cst328 + i2c_id: touch_i2c + interrupt_pin: GPIO4 + reset_pin: GPIO2 + + +See Also +-------- + +- :apiref:`cst328/touchscreen/cst328_touchscreen.h` +- :ghedit:`Edit` diff --git a/components/touchscreen/images/cst328.jpg b/components/touchscreen/images/cst328.jpg new file mode 100644 index 0000000000..af3ecf2c18 Binary files /dev/null and b/components/touchscreen/images/cst328.jpg differ diff --git a/images/cst328_.jpg b/images/cst328_.jpg new file mode 100644 index 0000000000..8a4ec49633 Binary files /dev/null and b/images/cst328_.jpg differ