Skip to content

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.

# Example configuration entry
touchscreen:
platform: cst328
id: my_touchscreen
interrupt_pin: GPIOXX
  • 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.

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 entry
binary_sensor:
- platform: cst328
name: "Screen touched"
  • 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