The very simple touchscreendemo for the 2.8" tft shield doesn't work. However, the tftpaintshield works perfectly on a Uno, Duemilenova and Mega Arduinos. If I replace the pin definitions of the touchscreendemo with those of the tftpaintshield, the new tftsceendemo works perfectly well.
In other words, I replace:
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A3 // must be an analog pin, use "An" notation!
#define YM 8 // can be a digital pin
#define XP 9 // can be a digital pin
with:
#define YP A1 // must be an analog pin, use "An" notation!
#define XM A2 // must be an analog pin, use "An" notation!
#define YM 7 // can be a digital pin
#define XP 6 // can be a digital pin
to get it to work
Is there anything missing from the original touchscreendemo code that won't allow pin definitions other than the ones shown in the tftpaintshield demo?.
Thanks
touchscreendemo for the 2.8" tft shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88086
- Joined: Sat Feb 07, 2009 10:11 am
Re: touchscreendemo for the 2.8" tft shield
The touchscreen demo was written for the raw touchscreen and the breakout version of the display - both of which preceded the shield version. There is some flexibility in wiring of the raw components, but to use it with the shield, you need to use the shield pinouts.
- pjrestrepo
- Posts: 49
- Joined: Sun Apr 15, 2012 7:43 pm
Re: touchscreendemo for the 2.8" tft shield
Thanks. Perhaps having one example for the shield and another for the non-shield screen will help, or, at the very least, add a comment to the example.
Thanks again,
Pedro
Thanks again,
Pedro
Please be positive and constructive with your questions and comments.