The LCD has a 2.8" 4-wire resistive touch screen glued onto it. You can use this for detecing finger-presses, stylus', etc. You'll need 4 pins to talk to the touch panel but we 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.
This tutorial requires the installation of the Adafruit Touchscreen library. This library is available for installation on the Arduino library manager.
Open up the Arduino library manager:
Search for the Adafruit Touchscreen library and install it
We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
Example
We connect the 4 pins as follows:
- Y+ is connected to Analog 1
- Y- is connected to Digital 7
- X+ is connected to Digital 6
- X- is connected to Analog 2
Now start up the tftpaint_shield example in the TFTLCD library. The right hand side will have 'color boxes' you can press to select which color you want to draw with. If you press the area to the left where the screen ends, it will erase the screen.
Page last edited March 08, 2024
Text editor powered by tinymce.