

We will start by including the SD_MMC.h library. For the ESP32 board I’m using, I will need to include the SC_MMC library. So, depending on the hardware configuration you are using, you should choose the correct one. For more details, you can also analyze Espressif’s documentation about the lower level drivers.


You can check the difference between them here. Nonetheless, please consider that the Arduino core has two libraries that can be used to interact with a SD card: the SD and the SD_MMC. This board contains a SD card socket that we can use to get started right away, without the need for additional electronics. In my case, I’ll be using a HW-818 ESP32 board model, which can be bought at eBay for around 10 Euros (you can find it here). Naturally, if you already have a file in the file system that you want to use, you can skip the writing part. You can check the procedure for writing a file here. I’ll assume that the file did not exist beforehand in the SD card and include the code to write it. In this tutorial we will check how to connect the ESP32 to a SD card and read a file from it. PLEASE reconsider this excessive restriction.In this tutorial we will check how to connect the ESP32 to a SD card and read a file from it. But I REALLY need to be able to access these development files directly on the device when I do not have Internet access. With relative addresses the files work in both locations without change.

That way I can develop and test a set of related pages locally on my device, then later simply upload the set of files to my web site. Any links to other files also on the device within my html files are addresses *relative* to the current file. I either type in the complete "file://" URI or use a bookmark of that URI to directly reference a file on my device. Disallowing "file://" as an explicit link *within* any html file seems like it would be sufficient. However it would seem that disabling any and all URIs of "file://" in any situation is way too harsh a solution. I recognize that there are security issues underlying this decision, especially the potential of links within an on-line web page directly referencing "file://".
