How to use a 2.4″ TFT touchscreen with Arduino Uno
Note this screen shield only works with Arduino Uno
Details:
2.4″ TFT screen with resistive touch capability
Resolution: 240X320
Download and install the “mcufriend_kbv” library from the Arduino library manager
See below for more info:
https://www.arduino.cc/reference/en/libraries/mcufriend_kbv/
To show images from an SD card, the images should be the correct size for the screen (240X32 pixels) and in BMP format. Use the basic example sketch “ShowBMB_kbv_UNO” in the mcufriend_kbv library.
Touch screen:
Use the touchScreen_calabi_native example to get the correct values for your screen.
Use these values as a starting point:
const int XP=6,XM=A2,YP=A1,YM=7; //240x320 ID=0xE300
const int TS_LEFT=899,TS_RT=219,TS_TOP=197,TS_BOT=912;
Load the touch_shield_new example and substitute in the calibration values.
new project