<?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[Another basic question: how do the APIs interact?]]></title><description><![CDATA[<p dir="auto">The docs at <a href="https://docs.m5stack.com/en/api/" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/api/</a> are divided into various APIs: CORE API, CORE2 API, PAPER API etc.</p>
<p dir="auto">A very basic question: when programming  an M5 Paper, is the PAPER API the only one available?</p>
<p dir="auto">I sort of assumed it would be, because of the overlaps. But then I noticed that the example for <code>SetAlarmIRQ</code> on <a href="https://docs.m5stack.com/en/api/m5paper/rtc" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/api/m5paper/rtc</a> contains a call to <code>M5.Axp.PowerOff();</code>, which isn't covered in the PAPER API docs:</p>
<pre><code>void loop() {
  M5.update();
  M5.Rtc.GetTime(&amp;TimeStruct);
  M5.Lcd.setCursor(0, 15);
  M5.Lcd.printf("Time: %02d : %02d : %02d/n",TimeStruct.Hours, TimeStruct.Minutes, TimeStruct.Seconds);
  if(M5.BtnA.wasPressed()){
    M5.Lcd.println("M5Core2 Will Close, Restore After 5 seconds ");
    delay(2000);
    M5.Rtc.clearIRQ();
    M5.Rtc.SetAlarmIRQ(5);
    delay(10);
    M5.Axp.PowerOff();
  }
}
</code></pre>
<p dir="auto">So can we use any of the M5 APIs? Or is there some that we can use on M5 Paper, and some not?</p>
<p dir="auto">(e.g. the COREINK and M5GFX APIs support sprites - can I use those on M5 Paper?)</p>
<p dir="auto">TIA</p>
]]></description><link>https://community.m5stack.com/topic/4531/another-basic-question-how-do-the-apis-interact</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 12:21:38 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4531.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Aug 2022 17:26:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Fri, 19 Aug 2022 09:44:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a></p>
<blockquote>
<blockquote>
<p dir="auto">To clarify, I think you're implying that some of the other APIs are available to me on M5Paper, but some aren't - is that correct?</p>
</blockquote>
</blockquote>
<blockquote>
<p dir="auto">Yes, correct.</p>
</blockquote>
<p dir="auto">Is there any way to tell which ones can and which can't? Is it API by API, or is it more granular - certain functions documented under other APIs are available?</p>
<p dir="auto">For example, are the functions under <a href="https://docs.m5stack.com/en/api/core/power" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/api/core/power</a> available - lightSleep, deepSleep etc?</p>
<p dir="auto">Thanks again for all the help.</p>
]]></description><link>https://community.m5stack.com/post/18389</link><guid isPermaLink="true">https://community.m5stack.com/post/18389</guid><dc:creator><![CDATA[Hamnet]]></dc:creator><pubDate>Fri, 19 Aug 2022 09:44:54 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Thu, 18 Aug 2022 16:56:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hamnet" aria-label="Profile: hamnet">@<bdi>hamnet</bdi></a> Yes, correct.</p>
]]></description><link>https://community.m5stack.com/post/18382</link><guid isPermaLink="true">https://community.m5stack.com/post/18382</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Thu, 18 Aug 2022 16:56:38 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Thu, 18 Aug 2022 09:50:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/teastain" aria-label="Profile: teastain">@<bdi>teastain</bdi></a> that post looks very relevant, I'll see if I can understand it! My use case is that I'm trying to create a unit that will run on battery power for as long as possible; fetching data over WiFi only once every few days; updating the display perhaps 4-5 times/hour. So I want it to consume as little as possible most of the time.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> thank you, I'll check out the videos (I normally avoid videos, I find it easier to learn from text). To clarify, I think you're implying that <em>some</em> of the other APIs are available to me on M5Paper, but some aren't - is that correct?</p>
]]></description><link>https://community.m5stack.com/post/18375</link><guid isPermaLink="true">https://community.m5stack.com/post/18375</guid><dc:creator><![CDATA[Hamnet]]></dc:creator><pubDate>Thu, 18 Aug 2022 09:50:44 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Wed, 17 Aug 2022 18:56:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hamnet" aria-label="Profile: hamnet">@<bdi>hamnet</bdi></a> Great! If you are familiar with C++ and Arduino, stick to it!<br />
I'm not familiar with the Paper product but the display consumes no power when the image is static, and you can run it on a USB cube power supply.<br />
The other M5Stack products have an LCD display with constant current needed to power the backlight.<br />
As I am not familiar with PAPER, I guess I'm "deflecting" a little!<br />
M5Stack sometimes lacks in documentation and that's why this Community exists.<br />
Try this other Community post!<br />
<a href="https://community.m5stack.com/topic/2892/m5paper-shutdown-deep-sleep-wakeup/3">https://community.m5stack.com/topic/2892/m5paper-shutdown-deep-sleep-wakeup/3</a></p>
]]></description><link>https://community.m5stack.com/post/18373</link><guid isPermaLink="true">https://community.m5stack.com/post/18373</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Wed, 17 Aug 2022 18:56:57 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Wed, 17 Aug 2022 16:28:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hamnet" aria-label="Profile: hamnet">@<bdi>hamnet</bdi></a> There are some like the GFX that are not interchangeable. non e-ink devices have a refresh rate in milliseconds where as E-ink is counted in seconds because of the ay e-ink tech works. If you try using non e-ink graphics libs instead of the e-ink libs then you risk overdriving the displays and killing it.</p>
<p dir="auto">Have you watched all the YouTube videos on the M5Paper and M5Ink units?</p>
]]></description><link>https://community.m5stack.com/post/18370</link><guid isPermaLink="true">https://community.m5stack.com/post/18370</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 17 Aug 2022 16:28:25 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Wed, 17 Aug 2022 14:30:12 GMT]]></title><description><![CDATA[<p dir="auto">Well I wrote loads of programs in C (and a bit of C++) 20 years ago; and I've fiddled with Arduino a tiny bit a few years ago; so I think I'm comfortable in principle with working at that level. But I don't have any experience with ESP32, let alone M5 - and finding it hard to get both detailed (accurate!) reference documentation, and also the basic orientation.</p>
]]></description><link>https://community.m5stack.com/post/18368</link><guid isPermaLink="true">https://community.m5stack.com/post/18368</guid><dc:creator><![CDATA[Hamnet]]></dc:creator><pubDate>Wed, 17 Aug 2022 14:30:12 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Wed, 17 Aug 2022 13:04:12 GMT]]></title><description><![CDATA[<p dir="auto">You really know nothing about programming M5Stack?<br />
I’m going to say that you should be starting with UIFlow and then moving  on to core Micropython which is what UIFlow is built on.<br />
If you did that then I could help but ADD stops me from using arduino</p>
]]></description><link>https://community.m5stack.com/post/18367</link><guid isPermaLink="true">https://community.m5stack.com/post/18367</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 17 Aug 2022 13:04:12 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Wed, 17 Aug 2022 11:44:25 GMT]]></title><description><![CDATA[<p dir="auto">Hi Terry <a class="plugin-mentions-user plugin-mentions-a" href="/user/teastain" aria-label="Profile: teastain">@<bdi>teastain</bdi></a> you can't patronise me! I really know nothing - I'm new to all of this - M5, ESP32, etc. Thanks for taking the time to help.</p>
<p dir="auto">So to be clear: can I use <em>any</em> of the other APIs? (E.g. Core, Core2?)</p>
<p dir="auto">And in relation to this particular example, how can I turn the power off or put the device into deep sleep until the RTC wakes it up, given that Axp.PowerOff(); isn't available? (The <a href="https://docs.m5stack.com/en/api/m5paper/system_api" target="_blank" rel="noopener noreferrer nofollow ugc">PAPER API system/button/power docs</a> reference <code>shutdown</code> taking a delay to wake up again - but that does a full restart.)</p>
]]></description><link>https://community.m5stack.com/post/18364</link><guid isPermaLink="true">https://community.m5stack.com/post/18364</guid><dc:creator><![CDATA[Hamnet]]></dc:creator><pubDate>Wed, 17 Aug 2022 11:44:25 GMT</pubDate></item><item><title><![CDATA[Reply to Another basic question: how do the APIs interact? on Tue, 16 Aug 2022 20:44:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hamnet" aria-label="Profile: hamnet">@<bdi>hamnet</bdi></a> hmmm! I've never seen Arduino headers and libraries referred to as APIs! (live and learn)<br />
Headers and libraries for a specific sensor or in this case a controller with built in screen are like a "driver" in Windows that takes care of background nitty gritty details.<br />
The APX192 is a complex power system manager found in the Core modules (and M5Stickc).<br />
The Paper does not have this hardware so the M5.Axp.PowerOff(); command cannot be used.<br />
The API for the Paper lists the APX function erroneously. You will see that the example that you included in your post, SetAlarmIRQ() is actually uses #include &lt;M5Core2.h&gt;, which is a Core!!!<br />
The SetAlarmIRQ() may work if you delete the APX. (also M5.Lcd.println will not work0<br />
Hope this helps, sorry to patronize you if you knew this!<br />
Terry</p>
]]></description><link>https://community.m5stack.com/post/18357</link><guid isPermaLink="true">https://community.m5stack.com/post/18357</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Tue, 16 Aug 2022 20:44:53 GMT</pubDate></item></channel></rss>