- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought I would share an improved touch gesture solution. Please try it out and I would appreciate any feedback.
I started out with the CY8CKIT-044 Touch Gesture example and found the solution overly complicated and difficult to modify. I rewrote the "DetermineActiveButton()" and "DetectGesture()" functions. The concept was to capture 3 button sequence and compare that button sequence to gesture patterns defined in an array "swipe_pattern". This can be easily expanded to include other patterns like across and down, [LEFT, CENTER, DOWN]. Also, the original clockwise and counter_clockwise patterns required 5 buttons sequence to detect the first gesture and a further 3 button sequence to detect a continuing sequence.. I modified this so that only 3 buttons are required to detect a clockwise or counter_clockwise gesture and only one more button to detect a continuing sequence. The clockwise and counter_clockwise gestures work really nicely. Look how quickly the LED color changes with circular patterns.
I also left the logger feature in the project as it was very helpful in debugging this solution.
GitHub - isyq/logger: A log system for PSoC project
Regards,
John
- Labels:
-
PSoC 345 LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JoSy_3545721,
Thank you for your interest in Cypress products. We believe that your solution will help a lot of other Cypress community users. Keep posting more projects in our community and help us grow
Regards,
Bragadeesh
Bragadeesh