CST328 Touch Screen Controller
The cst328 touchscreen platform allows using the touch screen controllers based on the cst328 chip with ESPHome.
The 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.
Base Touchscreen Configuration
Section titled “Base Touchscreen Configuration”# Example configuration entrytouchscreen: platform: cst328 id: my_touchscreen interrupt_pin: GPIOXXConfiguration variables
Section titled “Configuration variables”-
id (Optional, ID): Manually set the ID of this touchscreen.
-
interrupt_pin (Optional, Pin Schema): The touch detection pin.
-
reset_pin (Optional, Pin Schema): The chip reset pin.
-
All other options from Touchscreen.
Binary Sensor
Section titled “Binary Sensor”In addition to touch areas on the screen configured through the Touchscreen component, a binary sensor can be configured to react to touching anywhere on the screen.
# Example configuration entrybinary_sensor: - platform: cst328 name: "Screen touched"Configuration variables
Section titled “Configuration variables”-
cst328_id (Optional, ID): Manually specify the ID of the touchscreen.
-
All other options from Binary Sensor.
Sample config for the Waveshare ESP32-S3 Touch LCD 2.8 board
Section titled “Sample config for the Waveshare ESP32-S3 Touch LCD 2.8 board”i2c: sda: GPIO6 scl: GPIO7
touchscreen: - platform: cst328 id: my_touchscreen interrupt_pin: GPIO8 reset_pin: GPIO17