cst226 Touch Screen Controller

The cst226 touchscreen platform allows using the touch screen controllers based on the cst226 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 Lilygo T4-S3 AMOLED Display.

../../_images/t4-s31.jpg

cst226 touchscreen on Lilygo T4-S3 AMOLED Display

Base Touchscreen Configuration

# Example configuration entry
touchscreen:
  platform: cst226
  id: my_touchscreen
  interrupt_pin: GPIOXX

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.

Sample config for the T4-S3

i2c:
  sda: GPIO6
  scl: GPIO7

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

See Also