Skip to main content

MicroSD basics

The built-in microSD card slot on Inkplate 13SPECTRA can be of great use for your project. It can store a very large number of quality image files to be displayed and read and write data between deep sleeps. This page contains basic examples which will help you quickly get started with using the built-in 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.