Skip to content

Instantly share code, notes, and snippets.

@codelectron
Last active August 4, 2019 12:45
Show Gist options
  • Save codelectron/f4d5864ae532307fb391c6eb30021186 to your computer and use it in GitHub Desktop.
Save codelectron/f4d5864ae532307fb391c6eb30021186 to your computer and use it in GitHub Desktop.
#include "SD.h"
// https://github.com/espressif/arduino-esp32/blob/master/libraries/SPI/src/SPI.h
// https://wiki.wemos.cc/_media/products:d32:sch_d32_pro_v2.0.0.pdf
void setup() {
Serial.begin(115200);
SPI.begin(18, 19, 23, 4);
if(!SD.begin(4)){
Serial.println("Card Mount Failed");
return;
}
uint64_t cardSize = SD.cardSize() / (1024 * 1024);
Serial.printf("SD Card Size: %lluMB\n", cardSize);
}
void loop() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment