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

Low impact support for multitouch, example app #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

davidthings
Copy link

On my Adafruit 2.8" TFT Breakout Board with Capacitive Touch, the touch sensor certainly does register more than one touch.

This modification to the library adds a single routine

  uint8_t readMultiData(uint8_t *id0, uint16_t *x0, uint16_t *y0, uint8_t *id1, uint16_t *x1, uint16_t *y1 );

To read both touch locations, and return how many touches are registered.

The example (Multitouch.ino) uses this new function to implement a fairly complete multitouch system with regular events:

  TouchDown
  TouchUp
  TouchMove
  Tap
  DoubleTap

And two finger events

  Zoom
  Scroll

The user can drag and drop a shape, pinch and zoom it, double tap it to change shape, and swipe up and down to change color.

This is tested on a Teensy 3.1 connected to the Adafruit 2.8 TFT Breakout board.

(Sorry about the gratuitous changes to the main files - my editor seems to like removing trailing spaces from lines)

@andholz
Copy link

andholz commented Apr 14, 2015

Hi,
Great contribution imho, thank you! Looking forward to testing this more, comes just in time for a GUI I'm working on.

Cheers!

@actuel41
Copy link

This doesn't seem to work for my touchscreen because I can't get the FT6206 to recognize two touches. The second touch XY registers are always invalid/empty (0xFF). When I use two fingers it saves the XY value of a point halfway in-between. Is there some initialization I'm missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants