The LCD has a 2.8" or 3.2" 4-wire resistive touch screen glued onto it. You can use this for detecting finger-presses, stylus', etc. You'll need 4 pins to talk to the touch panel, and at least 2 must be analog inputs. The touch screen is a completely separate part from the TFT, so be aware if you rotate the display or have the TFT off or reset, the touch screen doesn't "know" about it - its just a couple resistors!
We have a demo for the touchscreen + TFT that lets you 'paint' simple graphics. There's versions for both SPI and 8-bit mode and are included in the libraries. Just make sure you have gone thru the TFT test procedure already since this builds on that.
Wire the additional 4 pins as follows:
- Y+ to Arduino A2
- X+ to Arduino D9 (Same as D/C)
- Y- to Arduino D8
- X- to Arduino A3
Another 4 pins seems like a lot since already 12 are taken up with the TFT but you can reuse some of the pins for the TFT LCD! This is because the resistance of the panel is high enough that it doesn't interfere with the digital input/output and we can query the panel in between TFT accesses, when the pins are not being used.
We'll be building on the wiring used in the previous drawing test for UNO
You can wire up the 4 touchscreen pins as follows. Starting from the top
- Y- connects to digital #9 (also D1)
- The next one down (X-) connects to Analog 2 (also C/D)
- The next one over (Y+) connects to Analog 3 (also CS)
- The last one (X+) connects to digital 8. (also D0)