<?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[[WIP] M5ez Hello World.]]></title><description><![CDATA[<p dir="auto"><strong>M5ez Hello World</strong></p>
<p dir="auto">M5ez is such a useful library that it provides the user with several methods to achieve the same same result.<br />
I will attempt to show you the different ways to make the basic Hello World app using the system.<br />
This first example (taken from the github page) shows you how to display Hello World using M5ez's header function.</p>
<p dir="auto"><img src="https://raw.githubusercontent.com/Ajb2k3/Photography-Turntable/master/m5ezhelloworld.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">This will show you how to make a Hello World project using M5ez</p>
<p dir="auto">The following code will creat a header on the screen with the text "Hello World".</p>
<blockquote>
<p dir="auto">#include &lt;M5ez.h&gt;<br />
void setup() {<br />
// put your setup code here, to run once:<br />
ez.begin();<br />
ez.header.show("Hello World");<br />
}<br />
void loop() {<br />
// put your main code here, to run repeatedly:<br />
delay (1000);<br />
}</p>
</blockquote>
<p dir="auto">Lets break this down.</p>
<p dir="auto">First up we call</p>
<blockquote>
<p dir="auto">#include &lt;M5ez.h&gt;</p>
</blockquote>
<p dir="auto">This tells Arduino (the IDE) to load the M5ez Library, next we call,</p>
<blockquote>
<p dir="auto">ez.begin();</p>
</blockquote>
<p dir="auto">Which tells the M5 to begin the M5ez app, and now we call,</p>
<blockquote>
<p dir="auto">ez.header.show("Hello World");</p>
</blockquote>
<p dir="auto">Which actually draws a blue line on the top of the screen with Hello World written in it. We can ignore the <strong>Void Loop(){}</strong> section because we are not using it, but I put <strong>delay(1000)</strong> in just to give it something to do.</p>
<p dir="auto">As I said above, this isn't the only way to do this. Lets try something else (thanks <strong>Rop</strong> for the example).</p>
<p dir="auto"><strong>Version2</strong><br />
<img src="https://raw.githubusercontent.com/Ajb2k3/Photography-Turntable/master/EZhw02.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">In this example all we did was replace the delay in the loop section with the following</p>
<blockquote>
<p dir="auto">ez.msgBox("M5ez minimal program", "Hello World !", "Settings");<br />
ez.settings.menu();</p>
</blockquote>
<p dir="auto">As you can see, the original header has been overwritten because (in this case) the contents of the loop over-rides the header set-up in the</p>
<blockquote>
<p dir="auto">void setup() {}</p>
</blockquote>
<p dir="auto">Section.</p>
]]></description><link>https://community.m5stack.com/topic/376/wip-m5ez-hello-world</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 21:18:30 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/376.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 21 Oct 2018 18:12:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Wed, 24 Jul 2019 04:46:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/orthodudz" aria-label="Profile: orthodudz">@<bdi>orthodudz</bdi></a> I worked it out now and currently writing up how for my handbook project.<br />
I have managed to get an image to load without m5ez using UIFlow but you will need to see the face book group for the progress.</p>
]]></description><link>https://community.m5stack.com/post/4861</link><guid isPermaLink="true">https://community.m5stack.com/post/4861</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 24 Jul 2019 04:46:54 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Wed, 24 Jul 2019 00:42:00 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> is this issue solved yet? I am also having difficulty adding image even using SPIFFS by imageSPIFFS example.</p>
]]></description><link>https://community.m5stack.com/post/4860</link><guid isPermaLink="true">https://community.m5stack.com/post/4860</guid><dc:creator><![CDATA[Orthodudz]]></dc:creator><pubDate>Wed, 24 Jul 2019 00:42:00 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Wed, 24 Oct 2018 15:56:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rop" aria-label="Profile: rop">@<bdi>rop</bdi></a> 在 <a href="/post/1822">[WIP] M5ez Hello World.</a> 中说：</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> If I try your hello.h, it doesn't compile because of double commas that I had to take out first. After doing that, it doesn't display an image indeed. But your image also doesn't display if I do</p>
<pre><code>m5.lcd.drawJpg((uint8_t *)hello_jpg, sizeof(hello_jpg));
delay(2000);
</code></pre>
<p dir="auto">In the <code>setup()</code> function. I don;t have the source JPG, but for now I'm assuming your JPG may be in a format that the M5Stack JPG library doesn't display, or something else is wrong with it.</p>
<p dir="auto"> </p>
<p dir="auto">Also: if you want the menu to have a header, you should add it in the declaration of the menu:</p>
<pre><code>ezMenu images ("Hello World!");
</code></pre>
<p dir="auto">The menu clears the screen before displaying anything when you run it. You'll rarely need to use <code>ez.header.show</code> if you use standard M5ez functionality.</p>
</blockquote>
<p dir="auto">Sorry, forgot the source jpg.<br />
<img src="https://github.com/Ajb2k3/Photography-Turntable/blob/master/hello.jpg" alt="alt text" class=" img-fluid img-markdown" /><br />
Interesting /\ the forum isn't showing the image above.<br />
I think it may be the conversion to array that is causing issues. I had this before but can't remember how I solved it. I also needed to check that it wasn't just my code that was at fault (excluding the hello.h)</p>
<p dir="auto">I left the header clear to give more screen room.</p>
<p dir="auto">MKII?<br />
<img src="https://raw.githubusercontent.com/Ajb2k3/Photography-Turntable/master/hello.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/1827</link><guid isPermaLink="true">https://community.m5stack.com/post/1827</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 24 Oct 2018 15:56:22 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Wed, 24 Oct 2018 12:30:47 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> If I try your hello.h, it doesn't compile because of double commas that I had to take out first. After doing that, it doesn't display an image indeed. But your image also doesn't display if I do</p>
<pre><code>m5.lcd.drawJpg((uint8_t *)hello_jpg, sizeof(hello_jpg));
delay(2000);
</code></pre>
<p dir="auto">In the <code>setup()</code> function. I don;t have the source JPG, but for now I'm assuming your JPG may be in a format that the M5Stack JPG library doesn't display, or something else is wrong with it.</p>
<p dir="auto"> </p>
<p dir="auto">Also: if you want the menu to have a header, you should add it in the declaration of the menu:</p>
<pre><code>ezMenu images ("Hello World!");
</code></pre>
<p dir="auto">The menu clears the screen before displaying anything when you run it. You'll rarely need to use <code>ez.header.show</code> if you use standard M5ez functionality.</p>
]]></description><link>https://community.m5stack.com/post/1822</link><guid isPermaLink="true">https://community.m5stack.com/post/1822</guid><dc:creator><![CDATA[Rop]]></dc:creator><pubDate>Wed, 24 Oct 2018 12:30:47 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Wed, 24 Oct 2018 05:31:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rop" aria-label="Profile: Rop">@<bdi>Rop</bdi></a> I can't get my example to work, can you help?<br />
I'm trying to use this image file<br />
<a href="https://github.com/Ajb2k3/Photography-Turntable/blob/master/hello.h" target="_blank" rel="noopener noreferrer nofollow ugc">hello.h file hosted on github.</a></p>
<p dir="auto">But when I compile and upload, the image doesn't show. Can you see what i'm doing wrong?<br />
This is my code:</p>
<blockquote>
<p dir="auto">#include &lt;M5ez.h&gt;<br />
#include "hello.h"<br />
void setup() {<br />
ez.begin();<br />
ez.header.show("Hello World");<br />
}<br />
void loop() {<br />
ezMenu images;<br />
images.imgBackground(TFT_BLACK);<br />
images.imgFromTop(40);<br />
images.imgCaptionColor(TFT_WHITE);<br />
images.addItem(hello_jpg, "Hello World");<br />
images.run();<br />
}</p>
</blockquote>
]]></description><link>https://community.m5stack.com/post/1816</link><guid isPermaLink="true">https://community.m5stack.com/post/1816</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 24 Oct 2018 05:31:46 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Tue, 23 Oct 2018 18:03:51 GMT]]></title><description><![CDATA[<p dir="auto">Okay, i am going to try, as i want a value above my slider :O)<br />
Thanks !</p>
]]></description><link>https://community.m5stack.com/post/1811</link><guid isPermaLink="true">https://community.m5stack.com/post/1811</guid><dc:creator><![CDATA[r_255]]></dc:creator><pubDate>Tue, 23 Oct 2018 18:03:51 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Tue, 23 Oct 2018 17:59:38 GMT]]></title><description><![CDATA[<p dir="auto">Any string that is supplied to any of M5ez's functions can also be a String variable.</p>
<p dir="auto">So:</p>
<pre><code>#include &lt;M5ez.h&gt;

void setup() {
  ez.begin();
}

void loop() {
  String header = "Hello World !";
  ez.msgBox("M5ez minimal program", header, "Settings");
  ez.settings.menu();
}
</code></pre>
<p dir="auto">works as well as the version further above...</p>
]]></description><link>https://community.m5stack.com/post/1810</link><guid isPermaLink="true">https://community.m5stack.com/post/1810</guid><dc:creator><![CDATA[Rop]]></dc:creator><pubDate>Tue, 23 Oct 2018 17:59:38 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Tue, 23 Oct 2018 17:25:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/r_255" aria-label="Profile: r_255">@<bdi>r_255</bdi></a> 在 <a href="/post/1808">[WIP] M5ez Hello World.</a> 中说：</p>
<blockquote>
<p dir="auto">I did try it, but failed hard...<br />
thanks !</p>
</blockquote>
<p dir="auto">What code are you using?</p>
]]></description><link>https://community.m5stack.com/post/1809</link><guid isPermaLink="true">https://community.m5stack.com/post/1809</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 23 Oct 2018 17:25:40 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Tue, 23 Oct 2018 17:08:13 GMT]]></title><description><![CDATA[<p dir="auto">I did try it, but failed hard...<br />
thanks !</p>
]]></description><link>https://community.m5stack.com/post/1808</link><guid isPermaLink="true">https://community.m5stack.com/post/1808</guid><dc:creator><![CDATA[r_255]]></dc:creator><pubDate>Tue, 23 Oct 2018 17:08:13 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Tue, 23 Oct 2018 16:38:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/r_255" aria-label="Profile: r_255">@<bdi>r_255</bdi></a><br />
Dont know, you would have to ask rop but you can directly print the variable with one of the m5's lcd print commands.</p>
]]></description><link>https://community.m5stack.com/post/1806</link><guid isPermaLink="true">https://community.m5stack.com/post/1806</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 23 Oct 2018 16:38:47 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Tue, 23 Oct 2018 12:16:34 GMT]]></title><description><![CDATA[<p dir="auto">Is the hello world text replaceable with a variable ?</p>
]]></description><link>https://community.m5stack.com/post/1804</link><guid isPermaLink="true">https://community.m5stack.com/post/1804</guid><dc:creator><![CDATA[r_255]]></dc:creator><pubDate>Tue, 23 Oct 2018 12:16:34 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Mon, 22 Oct 2018 18:05:07 GMT]]></title><description><![CDATA[<p dir="auto">Lets add an image to Hello world.</p>
<p dir="auto"><img src="https://raw.githubusercontent.com/Ajb2k3/Photography-Turntable/master/image1.jpeg" alt="alt text" class=" img-fluid img-markdown" /></p>
<blockquote>
<p dir="auto">#include &lt;M5ez.h&gt;<br />
#include "images.h"<br />
void setup() {<br />
ez.begin();<br />
ez.header.show("Hello World");<br />
}<br />
void loop() {<br />
ezMenu images;<br />
images.imgBackground(TFT_BLACK);<br />
images.imgFromTop(40);<br />
images.imgCaptionColor(TFT_WHITE);<br />
images.addItem(sysinfo_jpg, "Hello World");<br />
images.addItem(return_jpg, "Back");<br />
images.run();<br />
}</p>
</blockquote>
<p dir="auto">For this example I have imported the images.h file from the M5ez demo folder into the project. I Then add</p>
<blockquote>
<p dir="auto">#include "images.h"</p>
</blockquote>
<p dir="auto">which tell the IDE to compile the file into the code.<br />
To get the image menu to appear we need to replace our void loop with</p>
<blockquote>
<p dir="auto">void loop() {<br />
ezMenu images;<br />
images.imgBackground(TFT_BLACK);<br />
images.imgFromTop(40);<br />
images.imgCaptionColor(TFT_WHITE);<br />
images.addItem(sysinfo_jpg, "Hello World");<br />
images.addItem(return_jpg, "Back");<br />
images.run();<br />
}</p>
</blockquote>
<p dir="auto">What this does is calls the ezMenu images; instead of ez.msgBox.<br />
Next we set the background to black, tell the text to start 40px from the top in white.</p>
<blockquote>
<p dir="auto">images.addItem(sysinfo_jpg, "Hello World");</p>
</blockquote>
<p dir="auto">sysinfo_jpg calls the cpu logo and "Hello World" as in previous examples sets the caption to Hello World.</p>
]]></description><link>https://community.m5stack.com/post/1796</link><guid isPermaLink="true">https://community.m5stack.com/post/1796</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 22 Oct 2018 18:05:07 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Mon, 22 Oct 2018 05:56:56 GMT]]></title><description><![CDATA[<p dir="auto">I was just following your github page and this was the first thing.<br />
btw the delay is needed as i put it in the loop and it keeps vanishing as the screen clears and redraws.<br />
Changed the code to move the header into the setup section.<br />
the delay is just to give the loop something to do.</p>
]]></description><link>https://community.m5stack.com/post/1792</link><guid isPermaLink="true">https://community.m5stack.com/post/1792</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 22 Oct 2018 05:56:56 GMT</pubDate></item><item><title><![CDATA[Reply to [WIP] M5ez Hello World. on Sun, 21 Oct 2018 21:07:36 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> Maybe this is an even better Hello World program:</p>
<pre><code>#include &lt;M5ez.h&gt;

void setup() {
  ez.begin();
}

void loop() {
  ez.msgBox("M5ez minimal program", "Hello World !", "Settings");
  ez.settings.menu();
}
</code></pre>
<p dir="auto">It shows how much M5ez does out of the box (WiFi, clock, backlight settings)...</p>
<p dir="auto">(I will add this to the examples...)</p>
]]></description><link>https://community.m5stack.com/post/1791</link><guid isPermaLink="true">https://community.m5stack.com/post/1791</guid><dc:creator><![CDATA[Rop]]></dc:creator><pubDate>Sun, 21 Oct 2018 21:07:36 GMT</pubDate></item></channel></rss>