How to Use a TFT 2.8" Touchscreen to Display .bmp Images

by wilburie in Circuits > Arduino

188 Views, 0 Favorites, 0 Comments

How to Use a TFT 2.8" Touchscreen to Display .bmp Images

20230922_133120.JPG

This is a ELEGOO TFT 2.8" Touchscreen displaying a .BMP image! I couldn't find any tutorials on a 2.8" so I'll make one myself!

This uses a lot of images, so make sure to click on "See [] More Images" to follow the steps!

Supplies

20230922_131423.JPG

You'll need:

  • 2.8" TFT Touchscreen
  • Arduino UNO
  • MicroSD card formatted to FAT32
  • Something to plug the MicroSD into a computer (MicroSD to SD adapter, etc.)
  • A computer with the Arduino IDE installed
  • Hi-Speed USB cable for Arduino

Formatting the SD Card

20230922_131515.JPG
1.png
2.png
3.png
4.png
  1. Plug in your SD card using an adapter.
  2. Save any important files!
  3. Right click on the card icon and click "Format".
  4. Make sure that everything matches this image, or otherwise it's not readable by the arduino!

Uploading the Image & Making It Look Right

blank.bmp
5.png
6.png
7.png
8.png
9.png
10.png
11.png
12.png
  1. Download this image of a white square and save it to the root of the SD card.
  2. Rename the file to "img1".
  3. Open it with Paint.exe!
  4. Put whatever you want onto the image.
  5. Rotate it left by 90 degrees.
  6. It should look like this!
  7. Then flip it vertically.
  8. And now your image should look really weird, but this is how it works!
  9. Save your image.

Code + Reading the SD Card

13.png
  1. Safely eject your SD card! Make sure you do this or it won't read it.

Download "ShowBMP.ino" and upload it to your Arduino with the IDE.

It's a big file so it will take a while, but wait for the "Done Uploading." flag in the bottom right corner.

When done, press the reset button and watch your image come to life!

Downloads

You're Done!

FI8DAK8LR7SJ4X4.jpg
FGMQQ6RLR7SJ4V2.jpg

Enjoy watching your image show on your screen! Try some HQ images because these things are actually fairly high def.