Electronics

LCD TFT 2.4 inch Touch Screen Shield Module for Arduino UNO R3 240X320 With Pen

Out Of Stock

1

Description

The TFT 2.4 inch Touch Screen Shield Module is an 18-bit 262,000 color screen for Arduino UNO or Mega it comes with a Pen for convenient writing, controlled by an ILI9341 chip which can operate with 1.65V ~ 3.3V I/O interface voltage and an incorporated voltage follower circuit to generate voltage levels for driving an LCD. ILI9341 supports full color, 8-color display mode, and sleep mode for precise power control by software.

 

Specifications:

  • 2.4" diagonal LCD TFT display
  • Bright, 4 white-LED backlights, on by default but you can connect the transistor to a digital pin for backlight control
  • Colorful, 18-bit 262,000 different shades
  • 4-wire resistive touchscreen
  • 8-bit digital interface, plus 4 control lines
  • Uses digital pins 5-13 and analog 0-3. That means you can use digital pins 2, 3, and analog 4, and Pin 12 is available if not using the micro SD
  • 5V compatible, use with 3.3V or 5V logic
  • Resolution: 240X320
  • Driver IC: ILI9341

 


Package included:

  • 1 x 2.4" TFT LCD Shield Socket Touch Panel Module

 

All Libraries and Codes:

-Library from GitHub: Download here

-The codes have been used in the tutorial: Download here

 

Code for writing a text on the 2.4-inch Touch Screen Module :

#include "SPFD5408_Adafruit_GFX.h" // Core graphics library
#include "SPFD5408_Adafruit_TFTLCD.h" // hardware-specific library
#include "SPFD5408_TouchScreen.h"
#define LCD_CS A3 // chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0
#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin
// Assign human-readable names to some common 16-bit color values:
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET); //Declaring the tft lcd
void setup() {
 Serial.begin(9600);
 tft.reset(); //Reseting the shield
 tft.begin(0x9341); //Starting the shield
 tft.setRotation(0); //Defining the rotation value 0-3, (4 directions)
}
void loop() {
 tft.fillScreen(BLACK);
 tft.setCursor(0, 0); //Position of the cursor from where do you want to start writing
 tft.setTextColor(WHITE); tft.setTextSize(4); //Text color and size (1-5)
 tft.println("SurtrTech"); //Write text
 tft.fillRoundRect(110, 50, 100, 40, 10, RED); //One of the rectangle functions it draws a filled rectangle with round edges
 tft.setCursor(40, 55);
 tft.setTextColor(WHITE); tft.setTextSize(4);
 tft.println("Youtube"); //A part of this text is drawn in the same positions of the red rectangle drawn before,
 //so the last one will show on the top which is the tex
for(int i=0;i<5;i++){ //This little function print the text with a small size then clears it and show it bigger
 tft.fillRect(10, 150, 200, 200, BLACK);
 tft.setCursor(10, 150);
 tft.setTextColor(BLUE); tft.setTextSize(i);
 tft.println("Subscribe");
 delay(50);
 }
 delay(2000);
}