Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,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
Expand Down
82 changes: 82 additions & 0 deletions components/touchscreen/cst328.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
cst328 Touch Screen Controller
===============================

.. seo::
:description: Instructions for setting up cst328 touch screen controller with ESPHome
:image: t4-s3.jpg
:keywords: cst328, T4-S3

The ``cst328`` touchscreen platform allows using the touch screen controllers based on the cst328 chip with ESPHome.
The :ref:`I²C <i2c>` 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 <config-pin_schema>`): The touch detection pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The chip reset pin.

- All other options from :ref:`Touchscreen <config-touchscreen>`.

Binary Sensor
-------------

In addition to touch areas on the screen configured through the :ref:`Touchscreen <config-touchscreen>` component,
the cst328 supports a button located outside of the normal touchscreen area.
A binary sensor can be configured to react to touching this button.

.. 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 <config-binary_sensor>`.



Sample config for the Waveshare ESP32-S3 Touch LCD 2.8 board
************************************************************

.. code-block:: yaml

i2c:
sda: GPIO6
scl: GPIO7

touchscreen:
- platform: cst328
id: my_touchscreen
interrupt_pin: GPIO8
reset_pin: GPIO17

See Also
--------

- :apiref:`cst328/touchscreen/cst328_touchscreen.h`
- :ghedit:`Edit`
Binary file added components/touchscreen/images/cst328.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cst328.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading