-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add CST816 touchscreen driver #5941
Conversation
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
Is it not better to break this PR into two parts one for the SPI and the other for the touchscreen driver? |
Oh, the spi stuff was not supposed to be in there - needed it for testing the board (could not do it as an external component), and thought I had avoided checking it in but obviously slipped up! Thanks for the heads-up. |
@clydebarrow I know you are on holiday (saw that on discord), and did not actually expect you to answer my comments so promptly. I just thought I'd write my thoughts in the PR. |
Hi, I'm working on a pull request for the cst820 #5641 which is very close to the cst816s. Maybe this can be one component? |
Yes looks like one component would cover both. Will look at it more after Xmas. |
Does that display have a binary sensor? Where would it be? IIRC the 816 implements it by reporting a touch outside the screen boundary. |
Hi - I found this PR whilst trying to get a board with the designation I followed the thread to try out this PR, and was hitting |
I have added that as CST820. Try it and see. |
Ah, I now understand what the binary sensor means.. I mistakenly thought that binary sensor should trigger when you touch the screen area and that touch lies within the binary's sensor coordinates. @clydebarrow one more question. |
https://deploy-preview-3487--esphome.netlify.app/components/touchscreen/ To rotate 90 or 270 you will need swap_xy and one of the mirror settings. |
Thanks - I'm seeing I don't really have time to dig into this further now, but when I do I can raise a PR if further changes are needed? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #5941 +/- ##
==========================================
- Coverage 53.70% 53.50% -0.21%
==========================================
Files 50 50
Lines 9408 9515 +107
Branches 1654 1683 +29
==========================================
+ Hits 5053 5091 +38
- Misses 4056 4117 +61
- Partials 299 307 +8 ☔ View full report in Codecov by Sentry. |
I have the ESP32-2432S024C with CST820 touch controller as well and trying to get the touch functionality working. I got the screen displaying stuff with this code:
How do I get the touch now working / what files do I have to include in my ESPHome build? Sorry I am still learning ESPHome ... quite new to the syntax. If somebody could give me support that would be awesome. |
What does this implement/fix?
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3459
Test Environment
Example entry for
config.yaml
:# Example config.yaml
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: