<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[m5stack basic SDcard mount]]></title><description><![CDATA[<p dir="auto">Hi all, im having troubles reading struff on an SDcard.</p>
<p dir="auto">Here is the code I'm trying to run. The error message in the listDir function keeps popping.</p>
<p dir="auto">Anybody got examples or any cue?</p>
<p dir="auto">thanks</p>
<pre><code>#include &lt;Arduino.h&gt;
#include "FS.h"
#include "M5Stack.h"

void setup(){
    M5.begin(true, true, true, true);
    M5.Power.begin();
    Serial.begin(115200);

    listDir(SD, "/", 0);
    delay(5000);

}


void loop()
{
  
}
void listDir(fs::FS &amp;fs, const char * dirname, uint8_t levels){

    M5.Lcd.printf("Listing directory: %s\n", dirname);

    File root = fs.open(dirname);
    if(!root){
        M5.Lcd.println("Failed to open directory");
        return;
    }
}
</code></pre>
]]></description><link>https://community.m5stack.com/topic/4027/m5stack-basic-sdcard-mount</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 08:20:31 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4027.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Feb 2022 20:55:57 GMT</pubDate><ttl>60</ttl></channel></rss>