You can also run this from the pygamelcd project: sudo python test2.py

From screen to GPIO

The PiTFT from Adafruit is a touchscreen. So let's see how we get input from the screen. We'll use this to light some LEDs on the breadboard.

With the PiTFT installed and the 4 tactile buttons there aren't many GPIs left on the model B Raspberry Pi. So wire up #17 and #4. The software renders 4 labels on the screen and then looks for mouse events in the four quarters: