Description

⚙ Hardware Needed


📚 External Libraries Needed


None

📑 Code


import board, sys, os
import digitalio
import storage
import sdcardio

# Setup the SPI connection &
# connect to the card (mount the filesystem)
sdcard = sdcardio.SDCard(board.SPI(), board.xSDCS)

# Use the filesystem as normal! Our files are under /sd
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
sys.path.append("/sd")

Details


📖 CircuitPython storage documentation

📖 CircuitPython sdcardio documentation