Skip to main content

MicroSD basics

The built-in microSD card slot on Inkplate 13SPECTRA is useful for storing large numbers of quality images to display, and for reading and writing data between deep sleeps. This page covers basic examples to get you started.

MicroSD card slot highlighted on Inkplate 13SPECTRA
MicroSD card slot
ℹ️
Inkplate 13SPECTRA uses the SdFat library
⚠️
All supported card formats are: FAT16, FAT32, exFAT
⚠️
All supported card types are: SD, SDHC and SDXC

Preparing the microSD card before usage

For best results, use the official SD card formatter to format the card to FAT32 before usage.

Official SD card formatter
The official SD Card formatter

Initializing

Before the microSD card can be used in code, it must first be initialized, this powers on the microSD card circutry and does all the necessary memory allocations. In this code snipper, the microSD card is initialized and the result of the initialization is checked:

from inkplate13SPECTRA import Inkplate
import time
from os import listdir

inkplate=Inkplate()
inkplate.begin()

# Note:
# - This function must be called before accessing files on the SD card.
# - The fastboot option has no effect if the device is already running.
inkplate.initSDCard(fastBoot=True)

inkplate.SDCardSleep()

inkplate.initSDCard()

Initialize the onboard microSD card interface, allowing images, fonts, and data files to be loaded from the SD card.

Returns value: Boolean, True if the SD card was successfully initialized, otherwise False.

Function parameters:

TypeNameDescription
BooleanfastBootOptional. If True (default), use faster initialization to reduce startup time.

inkplate.SDCardSleep()

Puts the microSD card circuitry into low-power sleep mode to save energy when the card is not in use.