Hi,
I have a TFT Touch Shield v2.0 that I am using with an Arduino Meg2 2560. The IDE I am using is Arduino 1.8.9 for Windows 10. I have downloaded and installed the libraries in the IDE, but I keep getting following errors. Is there an update to the library that I should be using instead?
ERRORS:
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\examples\drawCircle\drawCircle.ino:7:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:42:0: warning: “SERIAL” redefined
#define SERIAL Serial
In file included from sketch\drawCircle.ino.cpp:1:0:
C:\Users\Jason and Ann\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.1\cores\arduino/Arduino.h:54:0: note: this is the location of the previous definition
#define SERIAL 0x0
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:42:0: warning: “SERIAL” redefined
#define SERIAL Serial
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:27:0,
from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:
C:\Users\Jason and Ann\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.1\cores\arduino/Arduino.h:54:0: note: this is the location of the previous definition
#define SERIAL 0x0
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp: In member function ‘unsigned char TFT::drawNumber(long int, short unsigned int, short unsigned int, short unsigned int, short unsigned int)’:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:846:47: error: no matching function for call to ‘drawString(char, short unsigned int&, short unsigned int&, short unsigned int&, short unsigned int&)’
drawString(’-’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: candidate: void TFT::drawString(char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor) {
^~~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:846:47: warning: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
drawString(’-’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: candidate: void TFT::drawString(const char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(const char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor){
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:846:47: warning: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
drawString(’-’,poX, poY, size, fgcolor);
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:856:47: error: no matching function for call to ‘drawString(char, short unsigned int&, short unsigned int&, short unsigned int&, short unsigned int&)’
drawString(‘0’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: candidate: void TFT::drawString(char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor) {
^~~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:856:47: warning: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
drawString(‘0’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: candidate: void TFT::drawString(const char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(const char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor){
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:856:47: warning: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
drawString(‘0’,poX, poY, size, fgcolor);
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:874:67: error: no matching function for call to ‘drawString(int, short unsigned int&, short unsigned int&, short unsigned int&, short unsigned int&)’
drawString(‘0’+ char_buffer[i - 1],poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: candidate: void TFT::drawString(char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(char string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor) {
^~~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:874:23: warning: invalid conversion from ‘int’ to ‘char*’ [-fpermissive]
drawString(‘0’+ char_buffer[i - 1],poX, poY, size, fgcolor);
~^, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: candidate: void TFT::drawString(const char
void drawString(const char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor){
^~~~~~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:874:23: warning: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
drawString(‘0’+ char_buffer[i - 1],poX, poY, size, fgcolor);
~^~~~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp: In member function ‘unsigned char TFT::drawFloat(float, unsigned char, short unsigned int, short unsigned int, short unsigned int, short unsigned int)’:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:891:47: error: no matching function for call to ‘drawString(char, short unsigned int&, short unsigned int&, short unsigned int&, short unsigned int&)’
drawString(’-’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: candidate: void TFT::drawString(char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor) {
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:891:47: warning: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
drawString(’-’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: candidate: void TFT::drawString(const char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(const char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor){
^~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:891:47: warning: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
drawString(’-’,poX, poY, size, fgcolor);
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:915:47: error: no matching function for call to ‘drawString(char, short unsigned int&, short unsigned int&, short unsigned int&, short unsigned int&)’
drawString(’.’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: candidate: void TFT::drawString(char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor) {
^~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:915:47: warning: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
drawString(’.’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: candidate: void TFT::drawString(const char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(const char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor){
^~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:915:47: warning: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
drawString(’.’,poX, poY, size, fgcolor);
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp: In member function ‘unsigned char TFT::drawFloat(float, short unsigned int, short unsigned int, short unsigned int, short unsigned int)’:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:948:47: error: no matching function for call to ‘drawString(char, short unsigned int&, short unsigned int&, short unsigned int&, short unsigned int&)’
drawString(’-’,poX, poY, size, fgcolor); /* add a ‘-’ /
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: candidate: void TFT::drawString(char, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor) {
^~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:948:47: warning: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
drawString(’-’,poX, poY, size, fgcolor); /* add a ‘-’ /
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: candidate: void TFT::drawString(const char, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(const char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor){
^~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:948:47: warning: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
drawString(’-’,poX, poY, size, fgcolor); /* add a ‘-’ /
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:973:47: error: no matching function for call to ‘drawString(char, short unsigned int&, short unsigned int&, short unsigned int&, short unsigned int&)’
drawString(’.’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: candidate: void TFT::drawString(char, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor) {
^~~~~~
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:255:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:973:47: warning: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
drawString(’.’,poX, poY, size, fgcolor);
^
In file included from C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:23:0:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: candidate: void TFT::drawString(const char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
void drawString(const char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor){
^
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master/TFTv2.h:259:7: note: conversion of argument 1 would be ill-formed:
C:\Users\Jason and Ann\Documents\Arduino\libraries\TFT_Touch_Shield_V2-master\TFTv2.cpp:973:47: warning: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
drawString(’.’,poX, poY, size, fgcolor);
^
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
Hi @jbuneo,
The library you are using is deprecated and now only supporting the use of Seeed_Arduino_LCD lib, please check it out Github: https://github.com/Seeed-Studio/Seeed_Arduino_LCD
anyway, I just forwarded you issued to Seeed TFT_Touch Libarray Github repo, you can find the issue here <LINK_TEXT text=“https://github.com/Seeed-Studio/TFT_Tou … /issues/12”>https://github.com/Seeed-Studio/TFT_Touch_Shield_V2/issues/12</LINK_TEXT>.
What code changes have to be made to make this work on an UNO?
this is the error message im getting when i try to compile with the new libraries listed above
Arduino: 1.8.10 (Windows 10), Board: “Arduino/Genuino Uno”
Multiple libraries were found for “SPI.h”
Used: C:\Program
Multiple libraries were found for “TFT_eSPI.h”
Used: C:\Users\wpierce\OneDrive
In file included from C:\Users\wpierce\OneDrive - Microsoft\Documents\Arduino\libraries\Seeed_Arduino_LCD-master/TFT_eSPI.h:60:0,
from C:\Users\wpierce\AppData\Local\Temp\arduino_modified_sketch_323004\Cellular_Automata.ino:8:
C:\Users\wpierce\OneDrive - Microsoft\Documents\Arduino\libraries\Seeed_Arduino_LCD-master/Fonts/glcdfont.c:8:24: fatal error: pgmspace.h: No such file or directory
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.