TFT Touch Shield Library and Arduino 1.0 IDE

The TFT library supporting the 2.8’’ TFT Touch Shield won’t compile on the Arduino 1.0 IDE. Is there an Arduino 1.0 version available?

Sorry to tell you, not ready for Arduino 1.0 yet.

Hello,this is the TFT&Touchscreen libraries for Arduino 1.0 IDE and seeeduino 328P board
http://www.seeedstudio.com/wiki/images/4/4d/TFT_TouchScreen_for_Arduino_1.0.zip

Regards,
frankie

Doesn’t compile for me…

C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp: In member function ‘void TFT::pushData(unsigned char)’:
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:35: error: ‘PORTE’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:36: error: ‘PORTG’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:38: error: ‘PORTH’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp: In member function ‘void TFT::all_pin_input()’:
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:425: error: ‘DDRE’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:426: error: ‘DDRG’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:427: error: ‘DDRH’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp: In member function ‘void TFT::all_pin_output()’:
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:444: error: ‘DDRE’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:445: error: ‘DDRG’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:446: error: ‘DDRH’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp: In member function ‘void TFT::all_pin_low()’:
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:462: error: ‘PORTE’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:463: error: ‘PORTG’ was not declared in this scope
C:\Documents and Settings…\My Documents\Arduino\libraries\TFT\TFT.cpp:464: error: ‘PORTH’ was not declared in this scope

Sorry,i use MEGA1280 so the 29 line in the file TFT.h is #define MEGA.
I guess your board is not MEGA1280 or MEGA2560,so you should change that line to #define SEEEDUINO

Oh…There is update few days before for Aduino 1.0.
How about your result?
Is that work find?

All is good with the world. Modified the line you identified and it compiles without an error. Thank you.

I have seeedstudio touch shield and Arduino MEGA 2560. I changed TFT.h:

#include <Arduino.h>
#include <avr/pgmspace.h>

#ifndef TFT_h
#define TFT_h

#define MEGA

I made these changes based on what I’ve read in this forum to get it to work.

When I try and compile I get the following errors:

TouchScreen/TouchScreen.cpp.o: In function `Point':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:19: multiple definition of `Point::Point()'
TouchScreen.cpp.o:TouchScreen.cpp:19: first defined here
TouchScreen/TouchScreen.cpp.o: In function `Point':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:19: multiple definition of `Point::Point()'
TouchScreen.cpp.o:TouchScreen.cpp:19: first defined here
TouchScreen/TouchScreen.cpp.o: In function `Point':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:23: multiple definition of `Point::Point(int, int, int)'
TouchScreen.cpp.o:TouchScreen.cpp:23: first defined here
TouchScreen/TouchScreen.cpp.o: In function `Point':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:23: multiple definition of `Point::Point(int, int, int)'
TouchScreen.cpp.o:TouchScreen.cpp:23: first defined here
TouchScreen/TouchScreen.cpp.o: In function `Point::operator==(Point)':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:29: multiple definition of `Point::operator==(Point)'
TouchScreen.cpp.o:TouchScreen.cpp:29: first defined here
TouchScreen/TouchScreen.cpp.o: In function `Point::operator!=(Point)':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:33: multiple definition of `Point::operator!=(Point)'
TouchScreen.cpp.o:TouchScreen.cpp:33: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:158: multiple definition of `TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char)'
TouchScreen.cpp.o:TouchScreen.cpp:158: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:158: multiple definition of `TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char)'
TouchScreen.cpp.o:TouchScreen.cpp:158: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:169: multiple definition of `TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)'
TouchScreen.cpp.o:TouchScreen.cpp:169: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:169: multiple definition of `TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)'
TouchScreen.cpp.o:TouchScreen.cpp:169: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen::readTouchY()':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:194: multiple definition of `TouchScreen::readTouchY()'
TouchScreen.cpp.o:TouchScreen.cpp:194: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen::readTouchX()':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:179: multiple definition of `TouchScreen::readTouchX()'
TouchScreen.cpp.o:TouchScreen.cpp:179: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen::pressure()':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:209: multiple definition of `TouchScreen::pressure()'
TouchScreen.cpp.o:TouchScreen.cpp:209: first defined here
TouchScreen/TouchScreen.cpp.o: In function `TouchScreen::getPoint()':
/Users/markrichardson/Documents/Arduino/libraries/TouchScreen/TouchScreen.cpp:51: multiple definition of `TouchScreen::getPoint()'
TouchScreen.cpp.o:TouchScreen.cpp:51: first defined here
TFT/TFT.cpp.o: In function `TFT::all_pin_low()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:457: multiple definition of `TFT::pushData(unsigned char)'
TFT.cpp.o:TFT.cpp:462: first defined here
TFT/TFT.cpp.o: In function `TFT::sendCommand(unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:57: multiple definition of `TFT::sendCommand(unsigned int)'
TFT.cpp.o:TFT.cpp:55: first defined here
TFT/TFT.cpp.o: In function `TFT::sendData(unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:72: multiple definition of `TFT::sendData(unsigned int)'
TFT.cpp.o:TFT.cpp:72: first defined here
TFT/TFT.cpp.o: In function `TFT::setOrientation(unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:245: multiple definition of `TFT::setOrientation(unsigned int)'
TFT.cpp.o:TFT.cpp:245: first defined here
TFT/TFT.cpp.o: In function `TFT::setXY(unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:259: multiple definition of `TFT::setXY(unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:259: first defined here
TFT/TFT.cpp.o: In function `TFT::setPixel(unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:268: multiple definition of `TFT::setPixel(unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:268: first defined here
TFT/TFT.cpp.o: In function `TFT::drawCircle(int, int, int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:274: multiple definition of `TFT::drawCircle(int, int, int, unsigned int)'
TFT.cpp.o:TFT.cpp:274: first defined here
TFT/TFT.cpp.o: In function `TFT::drawLine(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:310: multiple definition of `TFT::drawLine(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:310: first defined here
TFT/TFT.cpp.o: In function `TFT::drawVerticalLine(unsigned int, unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:330: multiple definition of `TFT::drawVerticalLine(unsigned int, unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:330: first defined here
TFT/TFT.cpp.o: In function `TFT::fillCircle(int, int, int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:291: multiple definition of `TFT::fillCircle(int, int, int, unsigned int)'
TFT.cpp.o:TFT.cpp:291: first defined here
TFT/TFT.cpp.o: In function `TFT::drawHorizontalLine(unsigned int, unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:345: multiple definition of `TFT::drawHorizontalLine(unsigned int, unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:345: first defined here
TFT/TFT.cpp.o: In function `TFT::drawRectangle(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:360: multiple definition of `TFT::drawRectangle(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:360: first defined here
TFT/TFT.cpp.o: In function `TFT::fillRectangle(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:369: multiple definition of `TFT::fillRectangle(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:369: first defined here
TFT/TFT.cpp.o: In function `TFT::drawChar(unsigned char, unsigned int, unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:377: multiple definition of `TFT::drawChar(unsigned char, unsigned int, unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:377: first defined here
TFT/TFT.cpp.o: In function `TFT::drawString(char*, unsigned int, unsigned int, unsigned int, unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:399: multiple definition of `TFT::drawString(char*, unsigned int, unsigned int, unsigned int, unsigned int)'
TFT.cpp.o:TFT.cpp:399: first defined here
TFT/TFT.cpp.o: In function `TFT::all_pin_input()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:420: multiple definition of `TFT::all_pin_input()'
TFT.cpp.o:TFT.cpp:425: first defined here
TFT/TFT.cpp.o: In function `TFT::all_pin_output()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:439: multiple definition of `TFT::all_pin_output()'
TFT.cpp.o:TFT.cpp:444: first defined here
TFT/TFT.cpp.o: In function `TFT::all_pin_low()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:457: multiple definition of `TFT::all_pin_low()'
TFT.cpp.o:TFT.cpp:462: first defined here
TFT/TFT.cpp.o: In function `TFT::exitStandBy()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:236: multiple definition of `TFT::exitStandBy()'
TFT.cpp.o:TFT.cpp:236: first defined here
TFT/TFT.cpp.o: In function `TFT::init()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:124: multiple definition of `TFT::init()'
TFT.cpp.o:TFT.cpp:124: first defined here
TFT/TFT.cpp.o: In function `TFT::getData()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:49: multiple definition of `TFT::getData()'
TFT.cpp.o:TFT.cpp:49: first defined here
TFT/TFT.cpp.o: In function `TFT::readRegister(unsigned int)':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:89: multiple definition of `TFT::readRegister(unsigned int)'
TFT.cpp.o:TFT.cpp:89: first defined here
TFT/TFT.cpp.o: In function `TFT::all_pin_low()':
/Users/markrichardson/Documents/Arduino/libraries/TFT/TFT.cpp:457: multiple definition of `Tft'
TFT.cpp.o:TFT.cpp:462: first defined here

I’m having the exact same problem and have tried everything the forum suggested and still nothing.

I can’t believe the lack of useful documentation…

Please post if you figure out how to make it work :frowning:

This forum is no help to beginners

Hi,
Sorry to tell you that I have made a mistake that I have put the files,TFT.cpp,TFT.h,TouchScreen.cpp,TouchScreen.h,in the folder of touchscreendemo.

I guess that you have compiled the touchscreendemo.ino so you can delete all the files in the folder of touchscreendemo but not touchscreendemo.ino.And then restart the IDE.It will be ok.

Regards,
Frankie

Thanks, I finally got my up and running. Just gotta figure the code I need for my project and how to do a GUI.

Hi all,

If you use our libraries or example then success, it should be no problem.

But if you want any other codes, sorry we are not support in software.

So any hardware problem can ask here, and we also love that all of you could share your project here to help more guys.

Best regards,

Yuri

I bought a 2.8 "TFT Touch Shield v1.0 by Seed Studio 12A11. I would like to know how to show bmp image. Can you help? I would also like to use the ethernet shield for the SD card.

Hi all,

Please try to use our example code first, if not success you can feedback your problem.
And give more detail or information with your device.

However, more function or code should do it yourself.

Best regards,

Yuri

I replaced this

#include <Arduino.h>
#include <avr/pgmspace.h>

#ifndef TFT_h
#define TFT_h

#define MEGA

and #define SEEEDUINO with #define MEGA.

Tft.setOrientation(0); not work.

All the examples work with the Arduino One r2, except the tftbmp. screen black. SD card is read.
All the examples work with the Arduino Mega r3, except the tftbmp. the image is loaded, but it is confusing.
The SD card is in the arduino ethernet shield.
You can view an image and draw or write text at the same time?
You can change the brightness of the display?

I’m Trying to get this to work with the touch shield and Arduino mega 2560 and Arduino IDE 1.0.

Can someone please provide a step by step guide for dummies?

I downloaded “TFT & TouchScreen Libraries for Arduino 1.0” from this page: seeedstudio.com/wiki/2.8’’_TFT_T … #Resources

But I don’t know that I’m putting the files in the right locations.

When I try to compile the example file “touchscreendemo.ino” I get errors.

Please help.