After spending about half an hour wiring the display to an Arduino and double checking I found a couple of libraries online but the ones I found were old and out of date and would not compile.
After messing with the libraries for a little while I was able to get the UTFT library to compile under the Arduino 1.6.5 IDE.
Then, it still didn’t work.
After a little more trial an error, I found the trick.
In the call that instantiates the UTFT object I had to set the model number to “ILI9325C”.
The Arduino pins in this example are for an Arduino Mega 2560.
Here is a code snippet.
#include <UTFT.h>
extern uint8_t SmallFont[];
UTFT myUTFT(ILI9325C,38,39,40,41);
void setup()
{
myUTFT.InitLCD();
myUTFT.setFont(SmallFont);
}
void loop()
{
myGLCD.clrScr();
myGLCD.setColor(255, 0, 0);
myGLCD.fillRect(0, 0, 319, 13);
myGLCD.setColor(64, 64, 64);
myGLCD.fillRect(0, 226, 319, 239);
myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(255, 0, 0);
myGLCD.print("A test of the drawing libray routines", CENTER, 1);
delay(4000);
}
Here are some videos.
Test #1 of the SainSmart TFT Display
Test #2 of the SainSmart TFT Display
Test #3 of the SainSmart TFT Display