usermods/sd_card/readme.md
platformio.ini and add to the build_flags of your configuration the following-D WLED_USE_SD_MMC when connected via MMC-D WLED_USE_SD_SPI when connected via SPI (use usermod page to setup SPI pins)-D SD_PRINT_HOME_DIR and -D WLED_DEBUG/ on boot via serialThe SPI port / pins can be modified via the WLED web-UI: Config → Usermod → SD Card
| option | effect | default |
|---|---|---|
pinSourceSelect | GPIO that is connected to SD's SS(source select) / CS(chip select) | 16 |
pinSourceClock | GPIO that is connected to SD's SCLK (source clock) / CLK(clock) | 14 |
pinPoci | GPIO that is connected to SD's POCI<sup>☨</sup> (Peripheral-Out-Ctrl-In) / MISO (deprecated) | 36 |
pinPico | GPIO that is connected to SD's PICO<sup>☨</sup> (Peripheral-In-Ctrl-Out) / MOSI (deprecated) | 15 |
sdEnable | Enable to read data from the SD-card | true |
<sup>☨</sup><sub>Following new naming convention of OSHWA</sub>
creates a macro SD_ADAPTER which is either mapped to SD or SD_MMC (see SD_Test.ino how to use SD / SD_MMC functions)
checks if the specified file is available on the SD card
bool file_onSD(const char *filepath) {...}