Hello,
I have been struggling to print strings with the TFT.v2 library.
What works:
#include <stdint.h>
#include <TFTv2.h>
#include <SPI.h>
void setup()
{
TFT_BL_ON;
Tft.TFTinit();
}
void loop()
{
Tft.drawString("Task complete!",0,0,2,WHITE);
Tft.drawString("Task incomplete!",0,30,2,WHITE);
}
What I want to do:
#include <stdint.h>
#include <TFTv2.h>
#include <SPI.h>
String printString;
boolean taskComplete;
void setup()
{
TFT_BL_ON;
Tft.TFTinit();
}
void loop()
{
if(taskComplete == true)
{
printString = "Task complete!";
}
else
{
printString = "Task incomplete!";
}
Tft.drawString(printString,0,0,2,WHITE);
}
This is a simplified example. No matter what I do I get all sorts of errors or a blank screen.
Any help would be appreciated.