-
-
Notifications
You must be signed in to change notification settings - Fork 2k
CST328 Touchscreen #5188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
latonita
wants to merge
5
commits into
esphome:next
Choose a base branch
from
latonita:cst328
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+88
−0
Open
CST328 Touchscreen #5188
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.