Electorials Electronics
Published © GPL3+

Project 019: Arduino TFT Display w/ Resistive Touch Project

An interesting, simple project with a TFT shield which does not require any other components except for your Arduino and some code.

BeginnerProtip12 minutes2,252
Project 019: Arduino TFT Display w/ Resistive Touch Project

Things used in this project

Hardware components

2.8 inch 240x320 TFT LCD Display Module with Resistive Touch
×1
Arduino UNO
Arduino UNO
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
Depends on the Arduino.
×1
PCBWay Custom PCB
PCBWay Custom PCB
×1

Story

Read more

Code

Arduino TFT LCD Display Module with Resistive Touch Project Code

C/C++
Please download the three code libraries from the link given before compiling and uploading the program: https://bitbucket.org/displaymodule/dmtftlibrary/src/master/
#include <SPI.h>
#include <DmTftIli9341.h>
#include <utility/BubbleDemo.h>

#define TFT_CS  10
#define SD_CS   8
#define F_CS    6
#define T_CS    4

DmTftIli9341 tft = DmTftIli9341(10, 9);
BubbleDemo bubbleDemo(&tft, tft.width(), tft.height());

void setup ()
{
  // Set CS SPI pin HIGH for all SPI units, so they don't interfere
  pinMode(TFT_CS, OUTPUT);
  pinMode(T_CS, OUTPUT);
  pinMode(SD_CS, OUTPUT);
  pinMode(F_CS, OUTPUT);
  digitalWrite(TFT_CS, HIGH);
  digitalWrite(T_CS, HIGH);
  digitalWrite(SD_CS, HIGH);
  digitalWrite(F_CS, HIGH);
  
  tft.init();
}

void loop()
{
  bubbleDemo.run(750, 20);
}

Credits

Electorials Electronics
85 projects • 67 followers
I'm an electronic hobbyist interested in anything, from Arduino to drones. I plan to educate people with the content on my website.

Comments