If you are using a touchscreen with your Raspberry Pi, then this guide is for you.
Xstroke (Gesture recognition) is the perfect tool to help you get more out of your touhscreen. I am using a PiScreen
Gesture recognition allows you to draw “strokes” on your touchscreen, which get interpreted as commands or text. Xstroke allows these to be entered anywhere on the screen. In some cases, Xstroke can be used instead of a keyboard.
To accept input from a touchscreen we have to use the event interface of the Linux input system. We use the ioctl capabilities of the event interface, in addition to the normal read and write calls to get information from the touchscreen. This blog post explains how to use the touchscreen within your own programs using C as well as writing directly to the framebuffer.
I’m using a shield from Texy to attach my TFT to my Pi.
This is soooo much easier then connecting up the cables individually, which requires me to always refer to the wiring diagram… and it always takes me two or three goes to get it right.
This just requires a quick snap onto the top of the GPIO pins. It also includes wiring to use 3 buttons on the GPIO pins not being used by the TFT.
Notro has done some great work with developing drivers for different models of TFT displays for the Pi.
He successfully created one for the Adafruit 2.2″ TFT . This is a great little display and is very clear.