martinberlin / cale-idf

CalEPD is an Epaper component driver for the ESP-IDF framework with GFX and font support, optional touch interface, compatible with ESP32 / S2 / S3 / C3
https://fasani.de
Apache License 2.0
277 stars 26 forks source link

Add touch class to the parallel ED047TC1 #34

Closed martinberlin closed 3 years ago

martinberlin commented 3 years ago

Recently got the touch interface for this epaper from LILYGO that was implemented in #27

The idea is to adapt the same Focal Tech class to this touch interface and make it work the same we did for the 2.7 Touch from Goodisplay

4.7 epaper More pictures

define TOUCH_INT 13

SDA 15 SCL 14

define TOUCH_SLAVE_ADDRESS 0x5A

First test notes: i2c-touch: FT6X36_VENDID does not match. Received:0x7e Expected:0x11

martinberlin commented 3 years ago

Touch is implemented in branch : feature/34-touch Still a few edges to clean up. Specially Tapping since we have no documented events and how it is now a Tap in the screen will be transmitted as multiple pressed.

martinberlin commented 3 years ago

My touch is broken, think is the FPC cable or connector, so I will have to wait to test this feedback from Lilygo when the replacement comes:

This is equal to 0X03, which means pressed state, but not equal to 0X03, means lifted

https://twitter.com/lilygo9/status/1366563363027779589

event = (buf[idx] & 0x0F) >>1;
finger_id = (buf[idx] >>4) & 0x0F;

v1 Released in the touch component: https://github.com/martinberlin/FT6X36-IDF

v2 will be refactored using events (When that works as expected)

martinberlin commented 3 years ago

Issues with the new received touch and IDF>=4.3 (Using 4.4) Resolved in this commit/ branch refactor/oop

After that update touch seems to be working but is not drawing anything. Updating the class to : Ed047TC1() 960*540 (Non touch it draws again) CORRECTED - The method was commented out :) Now in new release Lilygo-EPD047

martinberlin commented 3 years ago

IDEA: Add some sleep function to the demo-keyboard example.

After 3 minutes it should go to sleep and then wake up (if possible) with the touch.