The Adafruit Grand Central M4 Express supports SDIO mode with the SDIO Breakout Board. First, wire the two together as shown:
|
To mount the SD card, use the following code. Remember to put it in the file mount_sd.py on CIRCUITPY so you can easily call it from code.py or the REPL with import mount_sd
.
import board import sdioio import storage sdcard = sdioio.SDCard( clock=board.SDIO_CLOCK, command=board.SDIO_COMMAND, data=board.SDIO_DATA, frequency=25000000) vfs = storage.VfsFat(sdcard) storage.mount(vfs, "/sd")