ul-gh/ESP32Touch

Add advanced touch recognition

Opened this issue · 7 comments

Hi Ulrich,
I was searching for a reliable touch lib for the esp32 lib like yours for a while. It really works well.

However, I would like to add some more advanced touch pattern methods, such as single tap, long tap, double tap. I'm unsure how to add such features to your code and I'm writing to get a hint where and how these should be added. An idea from your end would be much appreciated.

Thanks & Best Regards
-korkbaum

ul-gh commented

Dear Korrkbaum,

we would have to add some sort of time stamp or extra timers to the touch events and then qualify if two events belong to a single or double or long tap in ESP32Touch::dispatch_callbacks(ESP32Touch* self).

If you like, we can have a look at this next week, please write again or let me know how I can contact you via PN.

Hello ul-gh,
thanks for getting back to me. Unfortunately, I could'nt find a way to send you a PM but I added my mail address to my profile and it should be visible to you.
Your high-level design plan for the enhancement sounds good but I'm afraid that will go above and beyond my limited programming skills. Anyway, if you have any plan how we could tackle the job, please let me know and I will try my best.
BR
-korkbaum

ul-gh commented

Hello Ulrich,
I spent some thought on this and think I can contribute with an algorithm as a starting point. I hope I will find some time over the weekend and will send you any results to your spam address. I guess I will get me a spam address as well :-)
Thanks & Regards
Klaus

Hi guys,
did you come up with a working solution? I would be particularly interested in a long touch scenario. I did figure something out using the touchRead function, but it does not work very effectively.
Best regards,
freddeh

Hello freddeh,
I actually ended up with using touchread as well. ul-gh made a number of interesting suggestions in a PM trail but I failed to implement any of those.
BR -korkbaum

euphi commented

What would be useful is to have a simple API to check if touch-pin is currently touched or not.
Then you could use other libraries to detect pattern or do auto-repeat etc.