Skip to content
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 TT21100 touchscreen component #4793

Merged
merged 12 commits into from Jul 12, 2023
Merged

Add TT21100 touchscreen component #4793

merged 12 commits into from Jul 12, 2023

Conversation

kroimon
Copy link
Contributor

@kroimon kroimon commented May 8, 2023

What does this implement/fix?

Implements a component to interface with the TT21100 touchscreen.

Besides others, this chips is used on the Espressif ESP32-S3-BOX and ESP32-S3-Korvo-2-LCD. Other development efforts regarding this hardware is being coordinated here.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#2916

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040

Example entry for config.yaml:

i2c:
  scl: GPIO18
  sda: GPIO8

touchscreen:
  - platform: tt21100
    interrupt_pin: GPIO3
    reset_pin: GPIO48

binary_sensor:
  - platform: tt21100
    name: "Home"
    index: 0

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@probot-esphome
Copy link

probot-esphome bot commented May 8, 2023

Hey there @kroimon,
Thanks for submitting this pull request! Can you add yourself as a codeowner for this integration? This way we can notify you if a bug report for this integration is reported.
In __init__.py of the integration, please add:

CODEOWNERS = ["@kroimon"]

And run script/build_codeowners.py

(message by NeedsCodeownersLabel)

@kroimon kroimon changed the title Add TT2100 touchscreen component Add TT21100 touchscreen component May 8, 2023
@kroimon
Copy link
Contributor Author

kroimon commented May 9, 2023

For anyone wanting to test this PR on an ESP32-S3-BOX, here is the configuration YAML I used.
Buttons, Display and Touchscreen are working.

@kroimon kroimon marked this pull request as ready for review May 13, 2023 19:30
@kroimon
Copy link
Contributor Author

kroimon commented May 13, 2023

I have separated the buttons out into their own component as suggested by @ssieb and added documentation in esphome/esphome-docs#2916.

This is now ready for review.

@gsgxnet
Copy link

gsgxnet commented Jun 22, 2023

@rpatel3001
Copy link
Contributor

rpatel3001 commented Jun 27, 2023

Could you have the states of the buttons reported at poweron? Red/green/blue stay as unknown until the screen is touched (even not in a button zone). And for some reason "home" doesn't update until it's specifically touched.

@rpatel3001
Copy link
Contributor

added initial state in kroimon#88

@probot-esphome
Copy link

probot-esphome bot commented Jul 3, 2023

Hey there @jesserockz, mind taking a look at this pull request as it has been labeled with an integration (touchscreen) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

jesserockz
jesserockz previously approved these changes Jul 11, 2023
@jesserockz jesserockz merged commit 5f531ac into esphome:dev Jul 12, 2023
25 checks passed
@jesserockz jesserockz mentioned this pull request Jul 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants