We have an example sketch in the library showing how to display full color bitmap images stored on an SD card. You'll need a microSD card such as this one . This example will only work for Arduino v1.0 and later.

You'll also need an image. We suggest starting with this bitmap of a flower If you want to later use your own image, use an image editing tool and crop your image to no larger than 64 pixels high and 96 pixels wide. Save it as a 24-bit color BMP file - it must be 24-bit color format to work, even if it was originally a 16-bit color image - becaue of the way BMPs are stored and displayed!

Copy the violet.bmp to the microSD card and insert it into the back of the breakout board.

We'll have to add an extra 2 wires so we can 'select' and 'receive data' from the SD card


Old Style Board: (two rows of pins)

Connect the third pin SD ChipSelect of the OLED (gray wire) to pin #18 of the 74LVC245. Then connect pin #2 of the 74LVC245 to Arduino Digital #4. This is the pin to select that we want to talk to the microSD card.

Then connect second-from-the bottom pin of the OLED - SDOUT - with a wire directly to Arduino Digital #12 this is the longer white wire shown - this wire does not need to be level shifted.

New Style Board: (Single row of pins)

Add the following two connections between the breakout board and the Arduino:

  • SDCS (SC) - Digital #4.(Gray Wire)
  • MISO (SO) - Digital #12 (Orange Wire)

 

Bitmap Example Sketch

To display bitmaps from the on-board micro SD slot, you will need a micro SD card formatted FAT16 or FAT32 (they almost always are by default).

There is a built in microSD card slot on the rear of the breakout and we can use that to load bitmap images!

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:

Next you can either download the image here or copy it from the images folder from inside the library files.

Insert the card

Insert the micro SD card into the slot on the back of the SSD1331 breakout board.

Copy the bitmap file

Copy the file "daffodil.bmp" from the Adafruit_ImageReader_Library\images folder (or wherever you saved it if you downloaded the file) over to the root directory of your micro-SD card.

Load the bitmap example sketch

Select "Examples->Adafruit_ImageReader_Library->BreakoutSSD1331" and upload it to your Arduino.

You should see the daffodil! If you don't see it, check the Serial Monitor for hints on what might have gone wrong (maybe the microSD card had an issue).

This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012.

This page (Drawing Bitmaps) was last updated on Nov 27, 2020.