tft display arduino with sd-card factory

A micro sd card module is preferred in cases you need to store large amounts of data and other information for your Arduino project. The EEPROM of the Arduino microcontroller has a limited storage capacity and is specific with the format and nature of data it can hold. This makes it not the best for storing data like text, CSV, audio, video or image files.

A 74LVC125A Level Shifter on the module converts the interface logic from 3.3V-5V to 3.3V. This enables us to use this device with both 3.3V and 5V microcontrollers like Arduino.

Before inserting the micro SD card into the module and hooking it up to the Arduino, make sure it is properly formatted and is using the FAT16 or FAT32 file system. Most new SD cards come when already pre-formatted with a FAT file system but it’s always good to do it yourself to be certain.

The SD card module uses the SPI communication protocol and is therefore connected to the Arduino hardware SPI pins. The SPI pins depend on the type of Arduino used but in this case we are using the UNO whose SPI pins are from pin 10 to 12.

The connections are done as shown below. Make sure you don’t change the order of connection for the SCK, MOSI and MISO pins because they are declared in that order within the SD.h library.

The CardInfo sketch will not write any data to the card but it tells you if the card is recognized and also displays some information about it. This information is shown in the serial monitor like shown below.

After setting up the micro SD card module for use with Arduino, we can now be able to store data like images in the sd card and display them on a TFT LCD screen. The best images to display are bitmap images so make sure you convert your images to bitmap format before storing them into the SD card. You can use an online image convertor.

Another important aspect you should keep in mind when converting your images is the size of the images. This depends on the size of the screen you are using, for example am using a 128×128 pixels screen therefore my images should be that size. Also make sure the images don’t exceed 60kb so that the can easily be processed by the microcontroller to be displayed on the TFT screen.

tft display arduino with sd-card factory

Searching for a method to display the directory content of an SD card directly on the TFT screen did not lead to the necessary information. All I could find was a nice sketch to show the content on the Serial Monitor using the SdFat library ( => https://www.arduino.cc/en/Tutorial/CardInfo ). However, like in this sketch, using a second Arduino board containing an SD card could successfully redirect the input stream via Serial2 to the TFT display on the first board. But it did not work for redirection to the same board.

The solution: For the redirected input stream (&tft) to the TFT board an additional print command is necessary. So this looks like => tft.println(sd.ls(&tft,LS_R)); and this works!

tft display arduino with sd-card factory

And this is coming from someone with an Electronics & Programming background. I am shocked at the dearth of documentation and multiple libraries with multiple dates for this thing. And to find out that it might start out with a Mirror Image - WOW!

I am trying to make a truly Universal Remote Control out of this mess. I just got the Arduino Uno & the Display and put it together and there are NO pins left to operate an IR LED.

Can you elaborate on which libraries will work, I"ve been fighting with this thing since I got it. I need it to play a simple video if possible. I"m trying to help an elderly lady in her 80s be able to watch videos from the SD card. Any help would be greatly appreciated. It"s for a very good cause.0

Can this 2.8" elegoo display play video at all? I"m trying to make a unit that an older woman, in her 80"s can play a video on it, if I set it up correctly? This is for a really good cause, I desperately need help, this is super important. Helping elderly folks with modern technology is tough. But I really need it to be able to play a video off the SD card if possible. Any help would be super highly appreciated.ReplyUpvote

Hello,please post our code also ..the screen driver must be known and that info must be known in order to get these things to work correctly..you show your code and then the vid blurs..Someone needs to write a pdf teaching how ,what ,when and why concerning these screens I would gladly pay $10.00 and I am sure others would too.I have 3 different tftlcds only 1 works its for the mega and Bomer has a lib for it,I am really considering use of Nextion units from now on 4 pins easy programming but higher cost...also the small cell phone screens use spi mode and are real easy to set up and use

The program runs and nothing is displayed but a white screen. when I open the COM4 I see that when I hit the screen numbers appear to calibrate the screens position so it is registering but not showing up on the LCD. please help me before I pull all my hair out.1

Is there any way, with an UNO, to add other I/O, given all the pins are used/covered, and none are brought through? I"d like to interface a 5-pin joystick. Is the only answer "buy a Mega"?ReplyUpvote

I"m thinking I need an Arduino Mega to do what I want - a Universal Remote. Because after mounting the display there are NO pins left for anything else.0

I"m having issues getting this display to work on my Arduino 101 board with the libraries that are suggested - errors in compiling seem to indicate that the board type isn"t supported in the Adafruit_TFTLCD library. Here"s a representative error:

I finally got the touchscreen to work correct using your links to the libraries. Found out that this specific TFT display module uses pin 6 & 7 for touch sensor, instead of the standard 4 & 5.0

I never received a response on this, so went through the painful process of copying code from the video. It can be found here for others that might need it. Not that this has some minor changes, but is fully functional and I will continue to refine: https://github.com/siliconghost/Arduino_2.8in_TFT_wSD

tft display arduino with sd-card factory

This display module features high resolution, low power consumption, wide angle and easy wiring. It employs IPS display with a small size of 1.54 inches, offering 240×240 resolution. The module adopts SPI and GDI interface(work with maincontrollers with GDI port). This LCD display can be powered by 3.3V~5V, and the maximum is power consumption is 24Ma. This product can be used in many display applications: waveform monitor display, electronic gift box, electronic weather decorations, etc.

The product is a Breakout module. It adopts SPI communication and has onboard GDI interface, which reduces the complexity of wiring and can easily display the contents read from SD card.

This is an example of commonly-used icons. 1. We use GIMP2 to convert these icons into codes for better display. 2. We provide some icons for you, Click here to find more "Click here to find more").

tft display arduino with sd-card factory

When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.

tft display arduino with sd-card factory

The component TFT supports a 2.8 inch TFT display with a resolution of 240*320 pixels.The display is not soldered on the board, but there is a 14 pin connector for a TFT display. The ILI9341 has been tested.

There are four sample projects for the Arduino IDE which could be downloaded: TFT-Box3D (download here), TFT-Graphic-Test (download here), TFT-HelloWorld (download here) and TFT-HowToUseFonts (download here). And there are two examples for the Arduino IDE for using the touch functionality which could be downloaded: TFT-TouchBtn (download here) and TFT-TouchDraw (download here).

There are two dip switches for the component: SW311 and SW314. If you want to use the TFT display all switches on SW311 have to be on on. If you additonally want to use the touchpad of the display all switch of SW314 have to be on. The following two tables shows the functions and the potential conflicts with other components

After the download it"s necessary to add both libraries to your Arduino IDE. Open Sketch > Include Library > Add .ZIP Library ... and select the downloaded archive. Do it for both libraries.

There are four sample projects for the Arduino IDE which could be downloaded: TFT-Box3D (download here), TFT-Graphic-Test (download here), TFT-HelloWorld (download here) and TFT-HowToUseFonts (download here).

And there are two examples for the Arduino IDE for using the touch functionality which could be downloaded: TFT-TouchBtn (download here) and TFT-TouchDraw (download here).

tft display arduino with sd-card factory

Please download the three code libraries from the link given before compiling and uploading the program: https://bitbucket.org/displaymodule/dmtftlibrary/src/master/

With DisplayModule"s DMTFTLibrary, the software part of this project is made 10x easier due to no manual coding needed for each function performed. DisplayModule has also already written the main part of the code, so that will save you some time if you need to use this code again. Firstly, the code starts by defining some libraries used: we declare the SPI (Serial Peripheral Interface) library for communication between the TFT and the Arduino, the DMTFTIli934 library, which is used to drive the TFT with an Arduino and the BubbleDemo library, which is basically the library which stores all the code for this program. Then, we define some pins which aid in the software communication to the TFT display. We mention the TFT chip select pin on pin 10, the SD chip select pin on pin 8, the flash chip select pin on pin 6 and the touch screen chip select pin on pin 4. After that, we now add in a line where we declare the TFT being used with the chip select pin on pin 10 and the data/command (DC) pin being on pin 9 and on the following line, we mention that the bubble demo program will be used, which will consume the whole TFT display"s length and width. Now, the void setup section is present, where we set the TFT_CS, T_CS, SD_CS and the F_CS pins as output pins, so that data will be fed into the Arduino from the TFT display. Next, we declare the same set of pins high, meaning that they will be turned on, active and performing their individual function during this sketch. We then also initialise the display to start it up, which transitions us to the void loop section, with one command only. This command is to basically run the bubbleDemo program for 750 loops with a delay time of 20 milliseconds. Now, the software part has been already done and your program should be up and running fine!

tft display arduino with sd-card factory

This guide is about DWIN HMI Touch Screen TFT LCD Display. HMI Means Human-Machine Interface. DWIN is specialized in making HMI Touch screen displays that are compatible with all microcontrollers like Arduino, STM32, PIC, and 8051 families of Microcontrollers.

This is a Getting Started tutorial with 7-inch DWIN HMI TFT LCD Display. We will see the architecture, features, board design, components, and specifications. We will also learn about the TTL & RS232 interfaces. Using the DGUS software you can create UI and with SD Card you can load the firmware on display memory.

One of the method to load the firmware to the T5L DWIN LCD Display is by using the SD Card. An SD Card of up to 16GB can be used to download the firmware files. We can easily insert the Micro SD card into the SD Card slot on the backside.

After copying the file, remove the SD Card from your computer and insert it into the SD Card slot of DWIN LCD Display. Then power the display using the USB Cable. The firmware downloading process will start automatically.

The next part of this tutorial includes creating UI and interfacing DWIN LCD Display with Arduino. For that you can follow the DWIN LCD Arduino Interfacing Guide.

tft display arduino with sd-card factory

Open Arduino IDE, find TFT_eSPI in the file and example, the T-Display factory test program is located at TFT_eSPI -> FactoryTest, you can also use other sample programs provided by TFT_eSPI

3 In the Arduino IDE tool options, select the development board ESP32 Dev Module, select Disable in the PSRAM option, select 4MB in the Flash Size option, Other keep the default