<?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[Run Script Automatically when First Turned On]]></title><description><![CDATA[<p dir="auto">I would ideally like to load a bare metal MicroPython firmware with the M5stack libraries tagged on - but since the latter bit of code is not forthcoming (:( I have resorted to using the standard UIFlow 1.6.6 firmware and:</p>
<ol>
<li>Connect M5SticKC to computer via USB</li>
<li>Turn the Stick on</li>
<li>Start Thonny</li>
<li>Stop/Restart the Stick via Thonny Ctrl-F2</li>
<li>Open <a href="http://my.py" target="_blank" rel="noopener noreferrer nofollow ugc">my.py</a> file with Thonny</li>
<li>Run <a href="http://my.py" target="_blank" rel="noopener noreferrer nofollow ugc">my.py</a> via Thonny F5</li>
</ol>
<p dir="auto">Except that what I would really like to do is just turn on the Stick and have it run <a href="http://my.py" target="_blank" rel="noopener noreferrer nofollow ugc">my.py</a> automatically, independently of Thonny or any computers.  How can I do that?</p>
<p dir="auto">You'd think someone else would have had a similar question but I have searched far and wide for variations on the title of this post to no avail.</p>
<p dir="auto">Thanks,<br />
Jack</p>
]]></description><link>https://community.m5stack.com/topic/2523/run-script-automatically-when-first-turned-on</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 12:22:49 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2523.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Nov 2020 17:41:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Run Script Automatically when First Turned On on Tue, 01 Dec 2020 15:41:41 GMT]]></title><description><![CDATA[<p dir="auto">OK it works.  So for future reference this is what I did:</p>
<ul>
<li>Turn on the unit (mine is an M5StickC with UIFlow 1.6.6 firmware)</li>
<li>press the M5 button quickly after that to enter setup mode (my screen shows &lt;code&gt;)</li>
<li>side button to get the Setup menu</li>
<li>M5 again to select it</li>
<li>Switch Mode</li>
<li>M5 again</li>
<li>side button to select APP</li>
<li>side button to select '..' at top</li>
<li>M5 to go back to previous menu</li>
<li>side button to select Reboot</li>
<li>M5 to reboot</li>
</ul>
<p dir="auto">From now on whenever you turn it on the Stick will run <a href="http://boot.py" target="_blank" rel="noopener noreferrer nofollow ugc">boot.py</a> and then <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a> in the /flash directory.</p>
<p dir="auto">If when it's so running you attach the device to a computer via the USB cable, you can interrupt whatever it is doing by starting Thonny and hitting ctrl-F2 (Stop/Restart Backend), which will bring up the MicroPython REPL prompt.  Cool.</p>
]]></description><link>https://community.m5stack.com/post/10968</link><guid isPermaLink="true">https://community.m5stack.com/post/10968</guid><dc:creator><![CDATA[JackH]]></dc:creator><pubDate>Tue, 01 Dec 2020 15:41:41 GMT</pubDate></item><item><title><![CDATA[Reply to Run Script Automatically when First Turned On on Sat, 28 Nov 2020 23:26:56 GMT]]></title><description><![CDATA[<p dir="auto">Excellent, I will try that, thank you very much.</p>
]]></description><link>https://community.m5stack.com/post/10921</link><guid isPermaLink="true">https://community.m5stack.com/post/10921</guid><dc:creator><![CDATA[JackH]]></dc:creator><pubDate>Sat, 28 Nov 2020 23:26:56 GMT</pubDate></item><item><title><![CDATA[Reply to Run Script Automatically when First Turned On on Sat, 28 Nov 2020 21:50:14 GMT]]></title><description><![CDATA[<p dir="auto">Upload the file to the device. While turning the device on hold the A Button (the one with "M5". This opens a special menu. Click the other button to go to app list. There you can choose your file. The file you chose should now start every time you turn the device on.</p>
<p dir="auto">If you want to change this again, you can do this in setup in the same menu.</p>
]]></description><link>https://community.m5stack.com/post/10920</link><guid isPermaLink="true">https://community.m5stack.com/post/10920</guid><dc:creator><![CDATA[sodoku]]></dc:creator><pubDate>Sat, 28 Nov 2020 21:50:14 GMT</pubDate></item></channel></rss>