Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 14 additions & 0 deletions public/images/touchscreen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/content/docs/components/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,7 @@ Used for creating infrared (IR) remote control transmitters and/or receivers.
["CST816", "/components/touchscreen/cst816/", "cst816.jpg"],
["EKTF2232", "/components/touchscreen/ektf2232/", "ektf2232.svg", "Inkplate 6 Plus"],
["FT63X6", "/components/touchscreen/ft63x6/", "wt32-sc01.png"],
["GSL3670", "/components/touchscreen/gsl3670/", "touchscreen.svg", "dark-invert"],
["GT911", "/components/touchscreen/gt911/", "esp32_s3_box_3.png"],
["Lilygo T5 4.7", "/components/touchscreen/lilygo_t5_47/", "lilygo_t5_47_touch.jpg"],
["TT21100", "/components/touchscreen/tt21100/", "esp32-s3-korvo-2-lcd.png"],
Expand Down
88 changes: 88 additions & 0 deletions src/content/docs/components/touchscreen/gsl3670.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
description: "Instructions for setting up GSL3670 touch screen controller with ESPHome"
title: "GSL3670 Touch Screen Controller"
---

import APIRef from '@components/APIRef.astro';

The `gsl3670` touchscreen platform allows using the touch screen controllers based on the GSL3670 chip with ESPHome.
An [I²C](/components/i2c) bus is required to be set up in your configuration for this touchscreen to work.

This controller is used in the Seeed Studio reTerminal D1001.

The component requires a binary firmware file to be loaded into the controller during initialization. When using a built-in model, this firmware is downloaded automatically from the [esphome-libs/gsl3670-firmware](https://github.com/esphome-libs/gsl3670-firmware) release and cached locally, so it does not need to be supplied manually. The download is verified against a known SHA-256 checksum. Alternatively, a firmware file can be supplied from a custom URL or from a local file.

## Base Touchscreen Configuration

```yaml
# Example configuration entry using the built-in Seeed reTerminal D1001 model
touchscreen:
platform: gsl3670
id: my_touchscreen
model: SEEED-RETERMINAL-D1001
```

```yaml
# Example configuration entry for a custom touchscreen, firmware from a URL
touchscreen:
platform: gsl3670
id: my_touchscreen
interrupt_pin: GPIOXX
reset_pin: GPIOXX
firmware:
url: https://example.com/my_gsl3670_firmware.bin
sha256: 2e50501ad83656fb6fa3d92591f9f31add4d442c8e8a79f29f5c4d335bd127a4
```

```yaml
# Example configuration entry using a local firmware file
touchscreen:
platform: gsl3670
id: my_touchscreen
interrupt_pin: GPIOXX
reset_pin: GPIOXX
firmware:
file: my_gsl3670_firmware.bin
```

### Configuration variables

- **id** (*Optional*, [ID](/guides/configuration-types#id)): Manually set the ID of this touchscreen.
- **model** (*Optional*, string): A predefined model that sets default values for pin assignments, calibration, and firmware. Currently supported:
- `SEEED-RETERMINAL-D1001`: Seeed Studio reTerminal D1001. Sets appropriate defaults for interrupt pin, reset pin, calibration, axis mirroring/swapping, and the firmware download URL and checksum.
- `CUSTOM`: No defaults are applied; all options must be configured manually. This is the default.
- **interrupt_pin** (*Optional*, [Pin Schema](/guides/configuration-types#pin-schema)): The touch detection pin.
- **reset_pin** (*Optional*, [Pin Schema](/guides/configuration-types#pin-schema)): The chip reset pin.
- **firmware** (**Required**, dict): The source of the GSL3670 binary firmware file. When using a built-in model, this is set automatically. Exactly one of `url` or `file` must be provided:
- **url** (*Optional*, string): URL of the firmware file. The file is downloaded and cached locally at build time.
- **sha256** (*Optional*, string): The expected SHA-256 checksum of the downloaded firmware file. When set, the download is rejected if the checksum does not match.
- **file** (*Optional*, string): Path to a local firmware file, used instead of downloading from `url`. If the file is not found at the given path, the component will also look for it in its own directory.

The firmware is validated for correct format and integrity at config validation time.

- All other options from [Touchscreen](/components/touchscreen#config-touchscreen).

### Sample config for the Seeed reTerminal D1001

```yaml
i2c:
- id: lcd_i2c
sda:
ignore_strapping_warning: true
number: GPIO37
scl:
ignore_strapping_warning: true
number: GPIO38
scan: true
frequency: 400kHz

touchscreen:
- platform: gsl3670
i2c_id: lcd_i2c
model: SEEED-RETERMINAL-D1001
```

## See Also

- [Touchscreen Components](/components/touchscreen/)
- <APIRef text="gsl3670_touchscreen.h" path="gsl3670/gsl3670_touchscreen.h" />
1 change: 1 addition & 0 deletions src/content/docs/components/touchscreen/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ binary_sensor:
- [EKTF2232 Touchscreen Controller](/components/touchscreen/ektf2232/)
- [XPT2046 Touch Screen Controller (Updated version)](/components/touchscreen/xpt2046/)
- [TT21100 Touch Screen Controller](/components/touchscreen/tt21100/)
- [GSL3670 Touch Screen Controller](/components/touchscreen/gsl3670/)
- [gt911 Touch Screen Controller](/components/touchscreen/gt911/)
- <APIRef text="touchscreen.h" path="touchscreen/touchscreen.h" />
- <APIRef text="touchscreen_binary_sensor.h" path="touchscreen/binary_sensor/touchscreen_binary_sensor.h" />