Skip to content

Arduino TFT LCD shield showing BMP images from SD Card

 

Hello, this tutorial is a follow up of the 2 other ones about the 2.4″ TFT LCD Shield with Arduino UNO, so the first one was about Interfacing and fixing the touch function problem also inverted axis, then the second one was about using simple function to draw different shapes and how to create a touch button to activate some functions…

Interfacing and fixing touch problem in Arduino TFT 2.4″ LCD shield

TFT LCD 2.4″ Touch screen shield tutorial

But today we’re about the reading of images from SD card and showing them on the screen, first don’t forget to plug your SD card with your computer and format it as FAT32 then transfert your images don’t forget that they should be “BMP” format, Bitmaps 24 !! To have a correct image the resolutions should be 240*320, little explanation:

2-4-inch-tft-lcd-in-lahore-pakistan

 

This is the normal orientation of the screen you can show images of 240*320, this is the default rotation which is setRotation(0);

 

 

 

 

 

2-4-inch-tft-lcd-in-lahore-pakistan

This is the orientation of the screen if you setRotation(1); and now you can show images of 320*240.

 

 

 

So you can chose whatever suits you, either change the screen rotation or the image rotation on your PC…  then remeber or copy the image name and that’s it, plug your SD card in the shield.

sd

Those are the name of my bmp 24 bits images on SD card for like “Img1” we call it in the code by using “Img1.bmp”.

This slideshow requires JavaScript.

 

Library:

This is the library that worked for me: Download here if you use this library but when trying with example codes it shows you a white screen, you should definitely look for the library that suits you.

 

Codes:

Here are the codes I’ve used in the video in .ino format, don’t forget to change the name of the files you’re using. Don’t forget to check the tutorial in case you need some help.

-Code 1

-Code 2

Here is the second code in .txt format if you want a quick read

If you have a problem you can contact me.

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

One thought on “Arduino TFT LCD shield showing BMP images from SD Card Leave a comment

Leave a Reply

%d bloggers like this: