Monday 28 April 2014

SainSmart Mega 2560 + TFT_320QVT

I bought this:

SainSmart Mega2560 + 3.2" TFT LCD Shield + Touch Screen SD Reader For Arduino

http://youtu.be/zcrW7FHcZMM

http://youtu.be/8bnAmIq3BIw

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=280931953825

To get it working, all I needed to do was download the UTFT library from

http://www.henningkarlsen.com/electronics/library.php?id=51

Then go through and add:

const in front of each font definition in DefaultFonts.c

~/sketchbook/libraries$ diff -t UTFT UTFT.orig
diff -t UTFT/DefaultFonts.c UTFT.orig/DefaultFonts.c
21c21
< fontdatatype SmallFont[1144] PROGMEM={         
---
> const fontdatatype SmallFont[1144] PROGMEM={         
125c125
< fontdatatype BigFont[3044] PROGMEM={
---
> const fontdatatype BigFont[3044] PROGMEM={
234c234
< fontdatatype SevenSegNumFont[2004] PROGMEM={
---
> const fontdatatype SevenSegNumFont[2004] PROGMEM={

In the demo file, comment out the myGLCD line and replace it with this one:

// For Mega 2560
UTFT myGLCD(GEEE32,38,39,40,41);

// or

UTFT myGLCD(ITDB32S,38,39,40,41);

For the TFT_320QVT you of course want the 320x240 demos.

Helped:

  • http://forum.arduino.cc/index.php?topic=115211.0
  • http://technomungo.blogspot.com.au/2013/11/how-to-use-utf-library-on-sainsonic.html +

No comments:

Post a Comment