<?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[Code for UiFlow-execute block needed for reading and writing the sd-card]]></title><description><![CDATA[<p dir="auto">Hi everyone!<br />
Using UiFlow V1.3.5-Beta, i'm buliding a hour counter for my boat engine.</p>
<p dir="auto">The new timer blocks are great and very helpful, many thanks to the team.</p>
<p dir="auto">To store and restore the cumulated seconds i need code for the UiFlow-execute block for reading and writing the sd-card:</p>
<ul>
<li>Is there anyone who can help me?</li>
<li>Or are SD-card blocks foreseeen for the next beta version?</li>
</ul>
<p dir="auto">For a first preview of the hour counter here you can see the display content:</p>
<p dir="auto"><img src="/assets/uploads/files/1566830116504-hour_counter.jpg" alt="0_1566830111802_hour_counter.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">... translation of the german text:<br />
<strong>Title:</strong></p>
<ul>
<li><em>Betriebsstunden</em> = <strong>Operating Hours</strong></li>
</ul>
<p dir="auto"><strong>Labels:</strong></p>
<ul>
<li><em>Stunden</em> = <strong>Hours</strong></li>
<li><em>Tag</em> = <strong>Day</strong></li>
<li><em>Batterie</em> = <strong>Battery</strong></li>
</ul>
<p dir="auto">The Button Labeles are in english</p>
]]></description><link>https://community.m5stack.com/topic/1255/code-for-uiflow-execute-block-needed-for-reading-and-writing-the-sd-card</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 19:11:54 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1255.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Aug 2019 15:01:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Code for UiFlow-execute block needed for reading and writing the sd-card on Wed, 28 Aug 2019 01:31:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/gaviota" aria-label="Profile: Gaviota">@<bdi>Gaviota</bdi></a> glad I could be of help. The program looks great<br />
Unfortunately I don't think there is a way to post files on the forum.<br />
Other than copying and pasting the micropython output<br />
The only way is to host the file somewhere and paste the link.</p>
<p dir="auto">I would suggest the best way would be if you have a github account<br />
then make a repository with the file there and share it with us here.<br />
This would also allow for us to add it to our links of resources.</p>
<p dir="auto">Thank you for your requests, I will make sure to hand them on to the dev<br />
team. It is true that the updates on the offline version are lagging behind<br />
the online version but we will try to improve this. Blockly allows for a rectractable<br />
comment from the blocks so this shouldn't be hard to implement</p>
<p dir="auto">We used to have blocks for handling the SD card in our old platform M5GO<br />
so I don't see this as being too difficult to add either.</p>
<p dir="auto">All the best, Keep us updated on the progress of your project.</p>
]]></description><link>https://community.m5stack.com/post/5329</link><guid isPermaLink="true">https://community.m5stack.com/post/5329</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Wed, 28 Aug 2019 01:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Code for UiFlow-execute block needed for reading and writing the sd-card on Tue, 27 Aug 2019 20:00:31 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a> thank you for the micropython code.</p>
<p dir="auto">This is my test program for writing and reading data to/from SD card:</p>
<p dir="auto"><img src="/assets/uploads/files/1566934254883-test_sd-read-write-resized.jpg" alt="0_1566934261928_Test_SD-Read-Write.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Is there a possebility adding files at the posting? then i can add the Blockly-file here.</p>
<p dir="auto">And last but not least a short whish list for  improvements at UiFlow:</p>
<ul>
<li>Early implementation of the actual UiFlow-Beta-version to the UiFlow-PC-Version</li>
<li>Adding remarks in a easy way, i took thererfore the execute block using a #</li>
<li>Blocks for handling SD cards (reading, writing, appending data)</li>
<li>Adding files in postings at the M5Stack community</li>
</ul>
]]></description><link>https://community.m5stack.com/post/5324</link><guid isPermaLink="true">https://community.m5stack.com/post/5324</guid><dc:creator><![CDATA[Gaviota]]></dc:creator><pubDate>Tue, 27 Aug 2019 20:00:31 GMT</pubDate></item><item><title><![CDATA[Reply to Code for UiFlow-execute block needed for reading and writing the sd-card on Tue, 27 Aug 2019 10:11:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/gaviota" aria-label="Profile: Gaviota">@<bdi>Gaviota</bdi></a> unfortunately there are no blocks yet to support SD writing. You could try something like this in micropython:</p>
<p dir="auto">from m5stack import *<br />
from m5ui import *<br />
from uiflow import *<br />
import os</p>
<p dir="auto">sd_mount()</p>
<p dir="auto">timeSinceBoot = None<br />
f = open("/sd/1.TXT", 'w+')</p>
<p dir="auto">while True:<br />
timeSinceBoot = time.ticks_ms()<br />
if btnA.wasPressed():<br />
f.write('{}\n'.format(timeSinceBoot))<br />
wait_ms(100)<br />
f.close()<br />
wait_ms(2)</p>
<p dir="auto">You may also check this for reference <a href="https://github.com/turbinenreiter/micropython/tree/master/examples/SDdatalogger" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/turbinenreiter/micropython/tree/master/examples/SDdatalogger</a></p>
]]></description><link>https://community.m5stack.com/post/5314</link><guid isPermaLink="true">https://community.m5stack.com/post/5314</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Tue, 27 Aug 2019 10:11:51 GMT</pubDate></item></channel></rss>