-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support for m5dial touch driver #2500
Comments
I think? this might be the relevant driver file for the touchscreen https://github.com/Xinyuan-LilyGO/T-RGB/blob/b5f004cfe723dd54a0fa63f04eaf4668e20ac77f/examples/factory/ft3267.cpp |
I'd like to do exactly the same. |
I found an ESPHome config file for M5Dial 1.28" Round Touch Screen. external_components:
- source: github://dgaust/esphome@gc9a01
components: [ ft3267, gc9a01 ]
refresh: 0s
i2c:
- id: bus_internal
sda: GPIO11
scl: GPIO12
scan: False
frequency: 400kHz
touchscreen:
platform: ft3267
binary_sensor:
- platform: touchscreen
name: "Central Circle Touch"
x_min: 90 # Center x - radius
x_max: 150 # Center x + radius
y_min: 90 # Center y - radius
y_max: 150 # Center y + radius
page_id: TestPage
on_release:
- display.page.show: FirstPage
- platform: touchscreen
name: "Circle 2 Touch"
x_min: 160 # Center x - radius
x_max: 220 # Center x + radius
y_min: 90 # Center y - radius
y_max: 150 # Center y + radius
page_id: TestPage
on_release:
then:
- logger.log: "Circle 2 Touched"
- platform: touchscreen
name: "Circle 3 Touch"
x_min: 125 # Center x - radius
x_max: 185 # Center x + radius
y_min: 151 # Center y - radius
y_max: 211 # Center y + radius
page_id: TestPage
on_release:
- display.page.show: WifiQR
- platform: touchscreen
name: "Circle 4 Touch"
page_id: TestPage
x_min: 55 # Center x - radius
x_max: 115 # Center x + radius
y_min: 151 # Center y - radius
y_max: 211 # Center y + radius
on_release:
then:
- logger.log: "Circle 4 Touched"
- platform: touchscreen
name: "Circle 5 Touch"
page_id: TestPage
x_min: 20 # Center x - radius
x_max: 80 # Center x + radius
y_min: 90 # Center y - radius
y_max: 150 # Center y + radius
on_release:
then:
- logger.log: "Circle 5 Touched"
- platform: touchscreen
name: "Circle 6 Touch"
page_id: TestPage
x_min: 55 # Center x - radius
x_max: 115 # Center x + radius
y_min: 29 # Center y - radius
y_max: 89 # Center y + radius
on_release:
- display.page.show: AirConPage
- platform: touchscreen
name: "Circle 7 Touch"
page_id: TestPage
x_min: 125 # Center x - radius
x_max: 185 # Center x + radius
y_min: 29 # Center y - radius
y_max: 89 # Center y + radius
on_release:
then:
- logger.log: "Circle 7 Touched" And it works !
|
Yeah, that's mine, I ended up writing a custom component that got the touchscreen working based off a similar touchscreen component |
You should have put a comment here to share 😉 |
Probably, if someone with more experience than me with esphome components wants to the repository is here.... It works, but no idea how it complies with esphome's requirements https://github.com/dgaust/esphome/tree/gc9a01/esphome/components/ft3267 More discussion on how it all comes together is over https://community.home-assistant.io/t/m5stack-dial-esp32-s3-smart-rotary-knob/623518 |
Coming back to this, you can use an inbuilt touch component for the touchscreen in the dial. Just need to define the address for it to work.
|
Describe the problem you have/What new integration you would like
The m5dial uses a GC9A01 screen with a FT3267 touch driver. I have been able to integrate the display using an external component, but not the touchscreen.
Please describe your use case for this integration and alternatives you've tried:
I have tried external components with used for other devices with GC9A01 based screens (like the ones with CST816S series touchscreens), but have not had any luck registering touch events.
Additional context
Details of the m5dial are here, including pinouts and other details
https://docs.m5stack.com/en/core/M5Dial
The text was updated successfully, but these errors were encountered: