SAM32
SAM32 copied to clipboard
SD Card filesystem access
- [x] via SAMD51 SPI
- [x] via ESP32 SPI
mounting an SD card on the ESP32 (SAM32v1):
- set SD_CS low in SAMD51 main.
- enter the esp32 REPL prompt. Current (sketchy) method is using the attached main.py main.py.txt
import uos
uos.sdconfig(uos.SDMODE_SPI, clk=5, mosi=18, miso=19, cs=14, maxspeed=16)
import os
os.mountsd(True)
os.listdir('/sd')
REPL output should look something like this:
running files on ESP32 from SD card
- Save desired file to sd card (externally)
- boot with attached main.py main.py.txt
- mount sd like so:
- run os.getcwd() and make sure you're in /sd, otherwise do os.chdir('/sd')
- now you you can do: import FILENAMEHERE.py