<?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[M5Paper sd card issues]]></title><description><![CDATA[<p dir="auto">I Have problem with Sd card in my first batch M5Paper, I try this code but don't works, anyone can try in it's m5paper?</p>
<p dir="auto">#include &lt;M5EPD.h&gt;<br />
File myFile;<br />
void setup(void)<br />
{<br />
M5.begin();<br />
Serial.begin(115200);<br />
SPI.begin(14, 13, 12, 4);<br />
bool ret = SD.begin(4, SPI, 20000000);<br />
if(ret == false)<br />
Serial.print("SD ERROR...\n");<br />
else<br />
{<br />
Serial.print("SD OK...\n");<br />
if (SD.exists("screen.txt"))<br />
Serial.print("screen.txt exists...\n");<br />
else<br />
Serial.print("screen.txt NOT exists...\n");<br />
Serial.print("Try to create screen.txt...\n");<br />
myFile = SD.open("screen.txt", FILE_WRITE);<br />
myFile.println("Some text...");<br />
myFile.close();<br />
if (SD.exists("screen.txt"))<br />
Serial.print("now screen.txt exists...\n");<br />
else<br />
Serial.print("not jet screen.txt exists...\n");<br />
}</p>
<p dir="auto">}</p>
<p dir="auto">void loop(void)<br />
{</p>
<p dir="auto">}</p>
]]></description><link>https://community.m5stack.com/topic/2786/m5paper-sd-card-issues</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Mar 2026 22:40:22 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2786.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Jan 2021 11:26:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Paper sd card issues on Wed, 27 Jan 2021 09:22:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/891">@yellowelise</a></p>
<p dir="auto">You have to do / when referencing the root in Arduino SD libraries..</p>
<p dir="auto">I've modified your example to output to the screen instead of serial and fixed it for you.. (I left the syntactically redundant exists, try create anyways, exists code in as that's what the original example did, it probably needs another if)</p>
<pre><code>#include &lt;M5EPD.h&gt;

M5EPD_Canvas canvas(&amp;M5.EPD);

File myFile;
void setup(void)
{
  M5.begin();
  M5.EPD.SetRotation(90);
  M5.EPD.Clear(true);
  M5.RTC.begin();
  canvas.createCanvas(540, 400);
  canvas.setTextSize(3);


  bool ret = SD.begin(4, SPI, 20000000);
  if(ret == false)
    canvas.drawString("SD ERROR...", 45, 100);
  else  
  {
    canvas.drawString("SD OK...", 45, 100);
    if (SD.exists("/screen.txt"))
      canvas.drawString("Screen.txt Exists...", 45, 150);
    else
      canvas.drawString("Screen.txt Not Exists...", 45, 150);
    canvas.drawString("Try create Screen.txt", 45, 200);
    myFile = SD.open("/screen.txt", FILE_WRITE);
    myFile.println("Some text...");
    myFile.close();
    if (SD.exists("/screen.txt"))
      canvas.drawString("Screen.txt Exists...", 45, 250);
    else
      canvas.drawString("Screen.txt Still Not Exists...", 45, 250);
  }

  canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
}

void loop(void)
{

}
</code></pre>
]]></description><link>https://community.m5stack.com/post/12051</link><guid isPermaLink="true">https://community.m5stack.com/post/12051</guid><dc:creator><![CDATA[sambartle]]></dc:creator><pubDate>Wed, 27 Jan 2021 09:22:35 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper sd card issues on Tue, 19 Jan 2021 19:18:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/891">@yellowelise</a> Please follow my instructions about what you need to post to get help.<br />
Also, see what statements are and are not necessary.</p>
]]></description><link>https://community.m5stack.com/post/11881</link><guid isPermaLink="true">https://community.m5stack.com/post/11881</guid><dc:creator><![CDATA[kevindtimm]]></dc:creator><pubDate>Tue, 19 Jan 2021 19:18:41 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper sd card issues on Tue, 19 Jan 2021 18:50:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi, you have M5Paper?<br />
you can try this sniplet?<br />
regards<br />
A</p>
]]></description><link>https://community.m5stack.com/post/11880</link><guid isPermaLink="true">https://community.m5stack.com/post/11880</guid><dc:creator><![CDATA[yellowelise]]></dc:creator><pubDate>Tue, 19 Jan 2021 18:50:24 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper sd card issues on Tue, 19 Jan 2021 16:04:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/891">@yellowelise</a> you can skip the SPI.begin(), it's not necessary.<br />
SD.begin(4); is all that's necessary for that call.<br />
There are issues with SD cards bigger than 16GB in some cases.</p>
<p dir="auto">BTW, when you report these issues it would be much better if you would report what errors you get as well as how far the program got (show the output)</p>
]]></description><link>https://community.m5stack.com/post/11874</link><guid isPermaLink="true">https://community.m5stack.com/post/11874</guid><dc:creator><![CDATA[kevindtimm]]></dc:creator><pubDate>Tue, 19 Jan 2021 16:04:55 GMT</pubDate></item></channel></rss>