This tutorial is for the original 2.8" TFT breakout, we have an updated tutorial now at https://learn.adafruit.com/adafruit-2-dot-8-color-tft-touchscreen-breakout-v2 for the most recent version of this product, but are keeping this tutorial for historical reference
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 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.
You can wire up the 4 remaining pins as follows. the one on the very left (Y- orange) can connect to digital 9, the next one over (X- green) connects to Analog 2, The next one over (Y+ blue) connects to Analog 3 and the last one (X+ gray) connects to digital 8. The X- and Y+ pins pretty much have to connect to those analog pins (or to analog 4/5) but Y-/X+ can connect to any digital or analog pins.
You can wire up the 4 remaining pins as follows. the one on the very left (Y- orange) can connect to digital 9, the next one over (X- green) connects to Analog 2, The next one over (Y+ blue) connects to Analog 3 and the last one (X+ gray) connects to digital 8. The X- and Y+ pins pretty much have to connect to those analog pins (or to analog 4/5) but Y-/X+ can connect to any digital or analog pins.
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
Now start up the tftpaint example in the Arduino 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.
You can use your fingertip to draw.
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.