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
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
I still give the items you shall be needing
- Arduino UNO
http://amzn.to/2gjeXOo - 2.4 inch TFT LCD shield
http://amzn.to/2fYc6WW - micro SD card
http://amzn.to/2f6MNUN - card reader
http://amzn.to/2fYfJMv - DC adapter for power (i am using a custom made lithium ion power source )
http://amzn.to/2gj9s29
What Is TFT LCD ?
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
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
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