Hi guys,
I'm trying to get my TFT LCD working using the Arduino library, I followed this example for printing a text. But when I'm about to compile, it gives the error "Error compiling for board Arduino/Genuino UNO".
Here's the complete error:
class Adafruit_ST7735 : public Adafruit_GFX {
^
/Applications/Arduino.app/Contents/Java/libraries/TFT/src/utility/Adafruit_ST7735.h:97:7: note: previously declared here
class Adafruit_ST7735 : public Adafruit_GFX {
^
/Users/lory/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GFX.h:13:7: warning: type of 'vtable for Adafruit_GFX' does not match original declaration
class Adafruit_GFX : public Print {
^
/Applications/Arduino.app/Contents/Java/libraries/TFT/src/utility/Adafruit_GFX.h:76:7: note: previously declared here
class Adafruit_GFX : public Print {
^
/Applications/Arduino.app/Contents/Java/libraries/TFT/src/utility/Adafruit_GFX.h:76:7: warning: type 'struct Adafruit_GFX' violates one definition rule
class Adafruit_GFX : public Print {
^
/Users/lory/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GFX.h:13:7: note: a type with the same name but different layout is defined in another translation unit
class Adafruit_GFX : public Print {
^
/Applications/Arduino.app/Contents/Java/libraries/TFT/src/utility/Adafruit_GFX.h:76:7: warning: type 'struct Adafruit_GFX' violates one definition rule
class Adafruit_GFX : public Print {
^
/Users/lory/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GFX.h:13:7: note: a type with the same name but different layout is defined in another translation unit
class Adafruit_GFX : public Print {
^
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Esplora.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
(I deleted part of the log because it exeeded the characters limit of 9000)
and here's my code
#include <SPI.h>
#include <TFT.h>
#include <Adafruit_ST7735.h>
#define cs 10
#define dc 9
#define rst 8
TFT screen = TFT(cs, dc, rst);
char stuff[4];
void setup() {
pinMode(cs, OUTPUT);
schermo.begin();
schermo.background(0, 0, 0);
schermo.stroke(255,255,255);
schermo.setTextSize(5);
schermo.text("hey",0,0);
}
Also, I didn't understand why I need to create an array to print a text
Thanks in advance