This is an example of how to use an SD Card using no-std Rust on an ESP32.
- GND to GND
- 5V to VCC
- MISO to GPIO2
- MOSI to GPIO15
- SCK to GPIO14
- CS to GPIO13 When flashing the ESP32, you need to disconnect the SD Card from the ESP32.
- Install espup
- Run
espup install
and follow its instructions - Install espflash
- Run
cargo run
Your output should be similar to this:
I (240) boot: Disabling RNG early entropy source...
SPI initialized. Initializing SD-Card...
Card size is 8069840896 bytes
Volume 0: Volume(SearchId(5000))
INFO - Logger is setup
Hello world!
Loop...
Loop...