<?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[Check your uPython version]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1612516248811-1612516092645-resized.jpg" alt="0_1612516245921_1612516092645.jpg" class=" img-fluid img-markdown" /></p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
import time
import uos

setScreenColor(0x000000)

vstart = None
vsysinfo = None
vsecs = None
vmins = None
vtimetext = None

battery = M5TextBox(0, 0, "loading", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)
uptime = M5TextBox(0, 32, "loading", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)
lb_sysinfo = M5TextBox(0, 64, "loading", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)

import math

lcd.setBrightness(10)
vstart = time.ticks_ms()
vsysinfo = uos.uname()
lb_sysinfo.setText(str(vsysinfo))
while True:
  battery.setText(str((str(((str('Battery: ') + str((power.getBatteryLevel()))))) + str('%'))))
  vsecs = round(((time.ticks_ms()) - vstart) / 1000)
  vmins = math.floor(vsecs / 60)
  vtimetext = (str((vsecs % 60)) + str('s'))
  if vmins != 0:
    vtimetext = (str(((str(vmins) + str('m ')))) + str(vtimetext))
  vtimetext = (str('Uptime: ') + str(vtimetext))
  uptime.setText(str(vtimetext))
  wait_ms(2)
</code></pre>
]]></description><link>https://community.m5stack.com/topic/2896/check-your-upython-version</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:06:18 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2896.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Feb 2021 09:11:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Check your uPython version on Sat, 06 Feb 2021 09:17:19 GMT]]></title><description><![CDATA[<p dir="auto">I'm trying to push for a unified API but the problem is that some of the devices are slightly different and require slightly different commands.<br />
Please add your request for a unified API to the suggestions list.</p>
]]></description><link>https://community.m5stack.com/post/12337</link><guid isPermaLink="true">https://community.m5stack.com/post/12337</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 06 Feb 2021 09:17:19 GMT</pubDate></item><item><title><![CDATA[Reply to Check your uPython version on Fri, 05 Feb 2021 14:27:55 GMT]]></title><description><![CDATA[<p dir="auto">I would prefer to have a stable API for all devices. Current situation makes re-use of code complicated.</p>
<p dir="auto">Someone could write a wrapper API to cover the differences ;-)</p>
<p dir="auto"><img src="https://imgs.xkcd.com/comics/standards.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto"><a href="https://xkcd.com/927/" target="_blank" rel="noopener noreferrer nofollow ugc">xkcd comic</a></p>
]]></description><link>https://community.m5stack.com/post/12318</link><guid isPermaLink="true">https://community.m5stack.com/post/12318</guid><dc:creator><![CDATA[mb]]></dc:creator><pubDate>Fri, 05 Feb 2021 14:27:55 GMT</pubDate></item><item><title><![CDATA[Reply to Check your uPython version on Fri, 05 Feb 2021 13:41:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mb" aria-label="Profile: mb">@<bdi>mb</bdi></a></p>
<p dir="auto">Different code...</p>
<p dir="auto">Core:<br />
<code>lcd.setBrightness(10)</code></p>
<p dir="auto">Core2:<br />
<code>screen.set_screen_brightness(10)</code></p>
]]></description><link>https://community.m5stack.com/post/12314</link><guid isPermaLink="true">https://community.m5stack.com/post/12314</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Fri, 05 Feb 2021 13:41:57 GMT</pubDate></item><item><title><![CDATA[Reply to Check your uPython version on Fri, 05 Feb 2021 13:33:16 GMT]]></title><description><![CDATA[<p dir="auto">Interesting, when executing on a M5Stack Core2 via REPL I get an error message:</p>
<pre><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 21, in &lt;module&gt;
AttributeError: 'TFT' object has no attribute 'setBrightness'
</code></pre>
]]></description><link>https://community.m5stack.com/post/12312</link><guid isPermaLink="true">https://community.m5stack.com/post/12312</guid><dc:creator><![CDATA[mb]]></dc:creator><pubDate>Fri, 05 Feb 2021 13:33:16 GMT</pubDate></item></channel></rss>