How to Display Images on 2.4inch TFT and Make It a Digital Photoframe

by geekrex in Circuits > Arduino

45092 Views, 159 Favorites, 0 Comments

How to Display Images on 2.4inch TFT and Make It a Digital Photoframe

IMG_2029e.JPG
IMG_2028.JPG
IMG_2029.JPG
IMG_2031.JPG

I really had this desire to build a digital photoframe from last three ,Until This January when i got this tft lcd touch module .I was excited but when i looked on the internet found very few (sorry none) help regarding it only JoaoLopesF instructable was there but the bitmap sketch had not been working so i cracked it as a challenged debugged it and made a working sketch .


Digital photo frame are quite popular now days.
but cost a hell lot of money with this DIY it cost less 25 $ to make one .
Most importantly its easy to add new file and even with a 1 gb card i can store more 5k photos.

Also like my page for support
https://www.facebook.com/makewithRex

Incredients

transcendmicrosd4GB.jpg
2.4-INCH-TFT-LCD-FOR-ARDUINO-03-500x500.jpg
IMG_1988.JPG

I still give the items you shall be needing

What Is TFT LCD ?

image40.jpg
image39.gif
image38.gif

TFT LCD stands for thin-film-transistor liquid-crystal display.It is a variant of a liquid-crystal display (LCD) that uses thin-film transistor (TFT) technology to improve image qualities such as addressability and contrast. A TFT LCD is an active-matrix LCD, in contrast to passive-matrix LCDs or simple, direct-driven LCDs with a few segments.

When no voltage is applied, the molecule structures are in their natural state and twisted by 90 degrees. The light emitted by the back light can then pass through the structure.

If a voltage is applied, i.e. an electric field is created, the liquid crystals are twisted so that they are vertically aligned. The polarized light is then absorbed by the second polarizer. Light can therefore not leave the TFT display at this location.

Using Th SD Card Shield and Code

Fritzing 01-02-2016 004540.jpg
Fritzing 01-02-2016 004619.jpg
Fritzing 01-02-2016 004713.jpg
Fritzing 01-02-2016 010953.jpg

Its good to have a SD card shield when you have a lot of file to read or write,
The 2.4 inch LCD touchscreen module has a inbuilt SD card module .
The SD card uses the SPI bus for interfacing with the arduino.
For the working of the SD card you need to call the SD library

Formatting the SD card

If you bought an SD card, chances are it's already pre-formatted with a FAT filesystem. However you may have problems with how the factory formats the card, or if it's an old card it needs to be reformatted. The Arduino SD library we use supports both FAT16 and FAT32 filesystems. If you have a very small SD card, say 8-32 Megabytes you might find it is formatted FAT12 which isn't supported. You'll have to reformat these card. Either way, it's always good idea to format the card before using, even if it's new! Note that formatting will erase the card so save anything you want first.

Wiring

Connect the 5V pin to the 5V pin on the Arduino

Connect the GND pin to the GND pin on the Arduino

Connect CLK to pin 13 or 52Connect DO to pin 12 or 50

Connect DI to pin 11 or 51Connect CS to pin 10 or 53

Code

Thanks to adafruit for its library and JoaoLopesF for the modified library
all his sketch work except the bitmap once i corrected it

Downloads

Setting Up the Bitmap Image

Fritzing 01-02-2016 013559.jpg
Fritzing 01-02-2016 013650.jpg
Fritzing 01-02-2016 013724.jpg

Arduino supports bitmap images so i needed to convert my jpeg into bmp files.
You can do these easily with Photoshop any version

  • Open Photoshop
  • Create a canvas of 240 x 320
  • drag the image you want in the Photoshop
  • adjust it
  • Save it as .bmp file
  • the bitrate should be 24

Once saved the file should be moved in the sd card