<?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[Convert ASCII to character on UiFlow 2.0]]></title><description><![CDATA[<p dir="auto">Prova_basica_1:<br />
<img src="/assets/uploads/files/1746017418260-captura-de-pantalla-2025-04-30-a-las-14.49.52-resized.png" alt="Captura de pantalla 2025-04-30 a las 14.49.52.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Prova_basica_2</p>
<p dir="auto"><img src="/assets/uploads/files/1746017577390-captura-de-pantalla-2025-04-30-a-las-14.52.25-resized.png" alt="Captura de pantalla 2025-04-30 a las 14.52.25.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Hello there,</p>
<p dir="auto">I've almost arrived at my goal!</p>
<p dir="auto">I've almost arrived at my goal! But; I don't know how I should continue. I will send you two files. They're created with Uiflow 2.0. The first version, named  Prova_basica_1 is absolutely functional, and the second one, named Prova_basica_2, is my nightmare!</p>
<p dir="auto">The trouble finds in the conversion from ASCII code to character, I can't do it</p>
<p dir="auto">Please, may you aid me?</p>
<p dir="auto">Thank you, and excuse me for the inconveniences.</p>
<p dir="auto">Best regards!</p>
<p dir="auto">P.S. In this message I send you two images from UiFlow 2.0 program and I've just attached below the code from two programs</p>
<p dir="auto">Code Prova_basica_1:</p>
<p dir="auto">import os, sys, io<br />
import M5<br />
from M5 import *<br />
from unit import CardKBUnit<br />
from hardware import I2C<br />
from hardware import Pin</p>
<p dir="auto">label0 = None<br />
i2c0 = None<br />
cardkb_0 = None</p>
<p dir="auto">text = None</p>
<p dir="auto">def cardkb_0_pressed_event(kb):<br />
global label0, i2c0, cardkb_0, text<br />
text = cardkb_0.get_string()<br />
M5.Lcd.printf(text)</p>
<p dir="auto">def setup():<br />
global label0, i2c0, cardkb_0, text</p>
<p dir="auto">M5.begin()<br />
Widgets.fillScreen(0x222222)<br />
label0 = Widgets.Label("label0", 105, 143, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)</p>
<p dir="auto">i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000)<br />
cardkb_0 = CardKBUnit(i2c0)<br />
cardkb_0.set_callback(cardkb_0_pressed_event)<br />
Widgets.fillScreen(0xffffff)<br />
M5.Lcd.startWrite()<br />
M5.Lcd.setCursor(10, 40)<br />
M5.Lcd.setTextSize(2)<br />
M5.Lcd.print('&gt;&gt;', 0x000000)</p>
<p dir="auto">def loop():<br />
global label0, i2c0, cardkb_0, text<br />
M5.update()<br />
cardkb_0.tick()</p>
<p dir="auto">if <strong>name</strong> == '<strong>main</strong>':<br />
try:<br />
setup()<br />
while True:<br />
loop()<br />
except (Exception, KeyboardInterrupt) as e:<br />
try:<br />
from utility import print_error_msg<br />
print_error_msg(e)<br />
except ImportError:<br />
print("please update to latest firmware")</p>
<p dir="auto">Code Prova_basica_2:</p>
<p dir="auto">import os, sys, io<br />
import M5<br />
from M5 import *<br />
from unit import CardKBUnit<br />
from hardware import I2C<br />
from hardware import Pin</p>
<p dir="auto">label0 = None<br />
i2c0 = None<br />
cardkb_0 = None</p>
<p dir="auto">text = None<br />
text2 = None</p>
<p dir="auto">def cardkb_0_pressed_event(kb):<br />
global label0, i2c0, cardkb_0, text, text2<br />
text = cardkb_0.get_string()<br />
M5.Lcd.printf(text)<br />
text2 = str((chr(text)))<br />
label0.setText(str(text2))</p>
<p dir="auto">def setup():<br />
global label0, i2c0, cardkb_0, text, text2</p>
<p dir="auto">M5.begin()<br />
Widgets.fillScreen(0x222222)<br />
label0 = Widgets.Label("label0", 105, 143, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)</p>
<p dir="auto">i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000)<br />
cardkb_0 = CardKBUnit(i2c0)<br />
cardkb_0.set_callback(cardkb_0_pressed_event)<br />
Widgets.fillScreen(0xffffff)<br />
M5.Lcd.startWrite()<br />
M5.Lcd.setCursor(10, 40)<br />
M5.Lcd.setTextSize(2)<br />
M5.Lcd.print('&gt;&gt;', 0x000000)</p>
<p dir="auto">def loop():<br />
global label0, i2c0, cardkb_0, text, text2<br />
M5.update()<br />
cardkb_0.tick()</p>
<p dir="auto">if <strong>name</strong> == '<strong>main</strong>':<br />
try:<br />
setup()<br />
while True:<br />
loop()<br />
except (Exception, KeyboardInterrupt) as e:<br />
try:<br />
from utility import print_error_msg<br />
print_error_msg(e)<br />
except ImportError:<br />
print("please update to latest firmware")</p>
]]></description><link>https://community.m5stack.com/topic/7537/convert-ascii-to-character-on-uiflow-2-0</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 19:12:12 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7537.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Apr 2025 12:55:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Convert ASCII to character on UiFlow 2.0 on Wed, 30 Apr 2025 23:38:26 GMT]]></title><description><![CDATA[<p dir="auto">I got it!!</p>
<p dir="auto">Sorry, the trouble was very simple!... If you want, the solution is below:</p>
<p dir="auto"><img src="/assets/uploads/files/1746056269421-captura-de-pantalla-2025-05-01-a-las-1.37.42-resized.png" alt="Captura de pantalla 2025-05-01 a las 1.37.42.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/29012</link><guid isPermaLink="true">https://community.m5stack.com/post/29012</guid><dc:creator><![CDATA[nmstack]]></dc:creator><pubDate>Wed, 30 Apr 2025 23:38:26 GMT</pubDate></item></channel></rss>