2 Synthesis‎ > ‎Comptronics‎ > ‎Arduino‎ > ‎

TFT LDC


SainSmart C46 Kit with Arduino Mega2560 + 3.2" TFT LCD Display + TFT LCD Adjustable Shield
Package Content

1 x Mega2560
1 x 3.2" TFT LCD Display
1 x 3.2 TFT LCD shield

Sain Smart Website.

Demos

To get a demo running on this with Linux I will assume you already have the Arduino IDE installed and so have set up a folder which is your sketchbook location. From the IDE menu choose;

File>Preferences

To see and/or modify the sketchbook folder location. Now download the libraries and example code;

New Display Demo

The more up to date drivers are to be found here in a download UTFT.rar;

www.henningkarlsen.com

It will end up in your Download folder. Create a folder called "libraries" in your sketchbook folder if it isn't already there;

In the Download folder inside UTFT.rar is a folder called  UTFT . Drag the inner most folder into the "libraries" folder you just created.

Inside the UTFT folder is a folder called "examples" containing examples. Don't touch them.

Now restart the Arduino IDE and you should see the examples listed in the menu choose;

File>Examples> UTFT> Arduino (AVR)> UTFT_Demo_320x240


Attempting to verify(compile) it may fail! You will need to replace #include "WProgram.h" with #include "Arduino.h" in some files contained in the "libraries folder. The compiler will tell you the files and the line to look at in its error messages.

Once this is done you can verify (compile) and upload the example which draws various squares, circles etc.

There is also documentation contained in the UTFT folder so take a look at that also to to see what functionality this library offers.

The Memory Card

THIS STILL DOESN'T WORK FOR ME BUT ALMOST! The pictures get all broken up and I don't know why but you can see them.

First you need a memory card of 2MB or less and it has to be formatted FAT16! That is not FAT32 so watch it! The linux commands to do this are;

sudo mount

which tells you what is mounted. The last lane for me was the memory card and read;

/dev/sdb1 on /media/D3B6-C529 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)

So now I see its /dev/sdb1 so I unmount it;

umount /dev/sdb1

and format it as FAT16;

sudo mkdosfs -F16 /dev/sdb1

That is the card prepared. 


So now Download;

  • https://s3-ap-northeast-1.amazonaws.com/sain-amzn/20/20-011-846+/3.2+LCD.rar
It will end up in your Download folder. Create a folder called "libraries" in your sketchbook folder if it isn't already there;

In the Download folder inside 3.2+LCD.rar is a folder called 3.2SD.rar  containing another folder called 3.2SD. Inside that are two folders;
  • ITDB02_tinyFAT16 drag it into the "libraries" folder you just created, and
  • tinyFAT containing another folder called the same i.e. tinyFAT, drag the inner tinyFAT into the "libraries" folder you just created.

Inside these folders are "examples" folders.. Don't touch them.

Now restart the Arduino IDE and you should see the examples listed in the menu choose;

File>Examples> ITDB02_Graph16> ITDB02_Graph16_Demo_Landscape


Attempting to verify(compile) it will fail! You will need to replace #include "WProgram.h" with #include "Arduino.h" in some files contained in the "libraries folder. The compiler will tell you the files and the line to look at in its error messages.

Another problem I had was a variable SS in mmc.cpp being already defined and so I had to rename it by hand substituting it for another name like SSSOMETHING.

You also need to put some pictures on the memory card there are some in your sketchbook folder libraries/ITDB02_tinyFAT16/Image_files.

These are in .RAW format. You can convert your own images from png jpg and gif on this link. but it expects you to resize it to 320x240 before you try to convert.
fair enough! ;-)

Old Display Demo

This is superseded be the heading "New Display Demo" above.

Download;
  • https://s3-ap-northeast-1.amazonaws.com/sain-amzn/20/20-011-846+/ITDB02_Graph16.rar
It will end up in your Download folder. Create a folder called "libraries" in your sketchbook folder if it isn't already there;

In the Download folder inside ITDB02_Graph16.rar is a folder called  ITDB02_Graph16 containing another folder called the same ITDB02_Graph16. Drag the inner most folder into the "libraries" folder you just created.

Inside the ITDB02_Graph16 folder is a folder called "examples" containing examples. Don't touch them.

Now restart the Arduino IDE and you should see the examples listed in the menu choose;

File>Examples> ITDB02_Graph16> ITDB02_Graph16_Demo_Landscape


Attempting to verify(compile) it will fail! You will need to replace #include "WProgram.h" with #include "Arduino.h" in some files ITDB02_Graph16.h and ITDB02_Graph16.cpp contained in the "libraries folder and possibly some other files. The compiler will tell you the files and the line to look  at in its error messages.

Once this is done you can verify (compile) and upload them and they should work.

  • ITDB02_Graph16_Demo_Landscape (C)2010 Henning Karlsen // web: http://www.henningkarlsen.com/electronics - Gives a rich demonstration of graphics.
  • TFT3_2_Mega - Just wipes over the screen.





Comments