Was trying to mess with the Arduino nano and TFT screen and when adding includes for TFT.h, it throws a compile error:
TFT.h(253,15,253,17)): error C0103: Variable 'DC' not found
If I do anything more than just add the include it screams all sorts of things.
my (alarmingly basic) code:
#include <SPI.h>
#include <TFT.h>
#define CS 10
#define DC 9
#define RESET 8
TFT screen =TFT(CS, DC, RESET);
void setup(){
screen.begin();
screen.background(0,0,0);
screen.stroke(255,255,255);
screen.text("Hello, World!",0,0);
}
void loop(){
}
and the errors:
Oh! Gotcha, that actually makes sense. I assume that applies to any example code i'm bringing over from the official arduino docs? I noted that the arduino part is virtual emulation, was wondering what it's doing on the backend.
As far as 'normal' circuits and logic for prototyping, this has been really neat to mess with
There is a c++ limitation with the compiling solution that I use currently. Constructors are in a slightly different form If you remove ‘=TFT’, so that you end up with ‘TFT screen(CS, DC, RESET) ;’ The compiler will function correctly 😊