Hi Guys
I have been struggling to get my TFT 2.8" itead studio ITDB02 v2 Shield to work with my Arduino UNO for the past week.
I have downloaded all libraries and performed all tutorials I could find without any success.
This is the Issue:
The TFT display just shows a white screen and does not respond to any code I put on. However, the furthest I have got to success, is when I use the UTFT library from RinkyDink Electronics:
http://www.rinkydinkelectronics.com/library.php?id=51
I have attached this code to this thread. When I insert my display module model (ITDB28) into the UTFT myGLCD(ITDB28,A5,A4,A3,A2); code line and compile the program, my LCD screen changes from white to thin white vertical striped lines along the screen. I feel like this means the Arduino is communicating with the TFT display because the display refreshes while the code is running. Which I feel means that it is trying to display the code because the frequency of screen refreshing changes when I alter the code to say change the background colour twice in the loop with a delay of 1000ms (it will refresh 2 in a second continually). I have attached an image of the white vertical lines!!
Has anyone else experienced this? I am convinced that the TFT display is broken or faulty, but I am very amateur with TFT displays and I can't find a solution anywhere. Therefore, I would like to ask all of you.
Attached is the code I use from the UTFT_demo_320x240 example, which corresponds to my 320x240 display. (how ever, on the specs it does say that my screen is 240x320.. this may be causing it????)
I had to edit the code to try display a rectangle because of the characters limit of this thread
// UTFT_Demo_320x240
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// This program is a demo of how to use most of the functions
// of the library with a supported display modules.
//
// This demo was made for modules with a screen resolution
// of 320x240 pixels.
//
// This program requires the UTFT library.
//
#include <UTFT.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
// Set the pins to the correct ones for your development shield
// ------------------------------------------------------------
// Arduino Uno / 2009:
// -------------------
// Standard Arduino Uno/2009 shield : <display model>,A5,A4,A3,A2
// DisplayModule Arduino Uno TFT shield : <display model>,A5,A4,A3,A2
//
// Arduino Mega:
// -------------------
// Standard Arduino Mega/Due shield : <display model>,38,39,40,41
// CTE TFT LCD/SD Shield for Arduino Mega : <display model>,38,39,40,41
//
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(ITDB28,A5,A4,A3,A2);
void setup()
{
randomSeed(analogRead(0));
// Setup the LCD
myGLCD.InitLCD();
myGLCD.setFont(SmallFont);
}
void loop()
{
int buf[318];
int x, x2;
int y, y2;
int r;
// Clear the screen and draw the frame
myGLCD.clrScr();
delay(500);
myGLCD.setColor(255, 0, 0);
myGLCD.fillRect(0, 0, 319, 13);
delay(500);
myGLCD.setColor(255, 255, 255);
}