There is a built in microSD card slot into the shield, and we can use that to load bitmap images! You will need a microSD card formatted FAT16 or FAT32 (they almost always are by default).

It's really easy to draw bitmaps. We have a library for it, Adafruit_ImageReader, which can be installed through the Arduino Library Manager (Sketch→Include Library→Manage Libraries…). Enter “imageread” in the search field and the library is easy to spot:

Download this tiger bitmap and save it to the microSD card! (Image by Shane Gorski)

Copy tiger.bmp into the base directory of a microSD card and insert it into the microSD socket on the underside of the shield.

Now start up the IDE and open the File→examples→Adafruit ImageReader Library→ShieldILI9341 example.

In the example, find the following section of code:

  // Load full-screen BMP file 'purple.bmp' at position (0,0) (top left).
  // Notice the 'reader' object performs this, with 'tft' as an argument.
  Serial.print(F("Loading purple.bmp to screen..."));
  stat = reader.drawBMP("/purple.bmp", tft, 0, 0);
  reader.printStatus(stat);   // How'd we do?

On the line with reader.drawBMP() change "/purple.bmp" to "/tiger.bmp".

After that, upload it to your Arduino. When the Arduino restarts, you should see the tiger appear as below!

To make new bitmaps, make sure they are less than 240 by 320 pixels and save them in 24-bit BMP format! They must be in 24-bit format, even if they are not 24-bit color as that is the easiest format for the Arduino. You can rotate images using the setRotation() procedure.

This guide was first published on Nov 30, 2012. It was last updated on Mar 08, 2024.

This page (Bitmaps) was last updated on Mar 08, 2024.

Text editor powered by tinymce.