I have recently purchased a RadioShack SEEEDUNIO 2.8" touch display. I recently upgraded to Arduino 1.0.5, I started working with the example programs to insure all worked. It did not. I reverted to Arduino 1.0.4 and that fixed the problems with controlling the Uno and the display with the sample programs. I moved to the Mega as I will need more I/O for the idea project I have and I load the same program on the Mega and the display just lights up, No screen init, or write text to screen. I have looked to insure that I'm using the same pins as the Uno and they are. I know that is a relative term as the MCU's are different, and the Mega has more I/O. This I have looked at the include files and am having a problem to understand where I need to look to find the problem. Yes, I do select the correct unit to program and com port. The software compilies and uploads with not problem. Example that works on Uno and not on the Mega. I can not locate the code that assignes the pins to com with display.
// Draw Texts - Demonstrate drawChar and drawString
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdint.h>
#include <TouchScreen.h>
#include <TFT.h>
#ifdef SEEEDUINO
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A1 // must be an analog pin, use "An" notation!
#define YM 14 // can be a digital pin, this is A0
#define XP 17 // can be a digital pin, this is A3
#endif
#ifdef MEGA
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A1 // must be an analog pin, use "An" notation!
#define YM 54 // can be a digital pin, this is A0
#define XP 57 // can be a digital pin, this is A3
#endif
void setup()
{
Tft.init(); //init TFT library
Tft.drawString("OUTSIDE TEMP IS:",50,0,1,CYAN);
Tft.drawString("77",100,20,3,RED);
//Tft.drawString("H",0,240,1,WHITE);
}
void loop()
{
}
Regards,
Dave M.