Arduino Uno and 2.8" TFT (mcufriend) interface issue

Thread Starter

ecaits

Joined Jan 6, 2014
56
Hi,

I want to interface 2.8" TFT which is of mcufriend, images attached for reference, with arduino uno.
I have written code as per below given but it display on white screen.
I have used SPI interfacing. Is there any library missing or anything else is the issue?

#include <TFT.h>
#include <SPI.h>

#define cs A3
#define dc A2
#define rst A4

TFT TFTscreen = TFT(cs, dc, rst);
char sensorPrintout[4];
void setup() {
TFTscreen.begin();
TFTscreen.background(0, 0, 0);
TFTscreen.stroke(255, 255, 255);
TFTscreen.setTextSize(2);
TFTscreen.text("Sensor Value :\n ", 0, 0);
TFTscreen.setTextSize(5);
}

void loop() {
String sensorVal = String(analogRead(A0));
sensorVal.toCharArray(sensorPrintout, 4);
TFTscreen.stroke(255, 255, 255);
TFTscreen.text(sensorPrintout, 0, 20);
delay(250);
TFTscreen.stroke(0, 0, 0);
TFTscreen.text(sensorPrintout, 0, 20);
}
 
Top