Created
March 3, 2023 00:37
-
-
Save gallaugher/32a5eafa3fa5da280413e1d7dd3c6b28 to your computer and use it in GitHub Desktop.
mount_sd.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mount_sd.py | |
import board, busio, sdcardio, storage | |
# setup pins for SPI | |
sck = board.GP10 # yellow | |
si = board.GP11 # blue | |
so = board.GP12 # green | |
cs = board.GP13 # yellow | |
spi = busio.SPI(sck, si, so) | |
sdcard = sdcardio.SDCard(spi, cs) | |
vfs = storage.VfsFat(sdcard) | |
storage.mount(vfs, "/sd") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment