- This topic has 1 reply, 2 voices, and was last updated 8 years, 5 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › Arduino › Arduino Uno and 2.8″ TFT (mcufriend) interface issue
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);
}
i am working on this interfacing and found some nice libraries
which built in controller your LCD has? like SSD or ILI or something like that
the arduino may have compatible library