Buy from US | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The SD Card Instruction for Mega2560 and 3.2 inch Touch Screen
The SD Card Instruction for Mega2560 and 3.2 inch Touch Screen
1)Objective:
In this project, we will use an Arduino Mega2560 board to drive ILI9341 3.2″ touch screen.
2)Parts and Devices
Pictures | Device | Quantity |
![]() |
Arduino mega2560 board | 1 |
![]() |
3.2 inch ili9341 screen | 1 |
![]() |
3.2 inch screen adapter shield | 1 |
Put the screen into shield first, then connect the shield to Arduino, it is quite straight forward.
3)Download and install UTFT and URTouch library file from following link and copy them into Arduino library folder.
URTouch download link
UTFT download link
Unzip files downloaded from above download link, then copy these 2 folders into Arduino library folder as following:
If you already have UTFT library in Arduino, you need change dsy[] array in UTFT.CPP under UTFT folder.
dsy[] array before change
dsy[] array after change
if you don’t change dsy[] array ,the screen only makes partial display as following:
after change:
4)Download Ili9341 Arduino sample code from following link:
ili9341 Arduino code download here
Unzip above file you will see 5 folders which contain following files:
UTFT_Demo_320x240_Serial_3.2.INO,URTouch_ButtonTest_3.2.INO,URTouch_Calibration_3.2.INO,URTouch_QuickDraw_3.2.INO,URTouch_QuickPaint_3.2.INO
you can use these files to display sample graph, calibrate screen, test touch, and draw lines.
Before loading these ino files into Arduino, you should go to Arduino IDE ->Tools->boards and select Arduino MEGA 2560. Otherwise your code might not work.
Note: UTFT library defines ili9431 device code is ITDB32WC, so make sure the first argument of MyGLCD function should be ITDB32WC (i.e. myGLCD(ITDB32WC,38,39,40,41)) , If your screen have changed, you should change the value as per definitions in UTFT.h under UTFT library folder.
There are serval version of our TFT LCD screen, Please try the following code one by one, if the touch screen does not work.
myGLCD(ITDB32WC,38,39,40,41)
myGLCD(CTE32,38,39,40,41)
Example :
About the Author