I got it!!
Sorry, the trouble was very simple!... If you want, the solution is below:
I was born in Minorca, but I've lived in Girona since 2014. I'm considere myself an catalan girl by adoption. I'm Math teacher, and I almost retired. I love to learn alot anything which is relacionated with the high end technology
I got it!!
Sorry, the trouble was very simple!... If you want, the solution is below:
Prova_basica_1:
Prova_basica_2
Hello there,
I've almost arrived at my goal!
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!
The trouble finds in the conversion from ASCII code to character, I can't do it
Please, may you aid me?
Thank you, and excuse me for the inconveniences.
Best regards!
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
Code Prova_basica_1:
import os, sys, io
import M5
from M5 import *
from unit import CardKBUnit
from hardware import I2C
from hardware import Pin
label0 = None
i2c0 = None
cardkb_0 = None
text = None
def cardkb_0_pressed_event(kb):
global label0, i2c0, cardkb_0, text
text = cardkb_0.get_string()
M5.Lcd.printf(text)
def setup():
global label0, i2c0, cardkb_0, text
M5.begin()
Widgets.fillScreen(0x222222)
label0 = Widgets.Label("label0", 105, 143, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)
i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000)
cardkb_0 = CardKBUnit(i2c0)
cardkb_0.set_callback(cardkb_0_pressed_event)
Widgets.fillScreen(0xffffff)
M5.Lcd.startWrite()
M5.Lcd.setCursor(10, 40)
M5.Lcd.setTextSize(2)
M5.Lcd.print('>>', 0x000000)
def loop():
global label0, i2c0, cardkb_0, text
M5.update()
cardkb_0.tick()
if name == 'main':
try:
setup()
while True:
loop()
except (Exception, KeyboardInterrupt) as e:
try:
from utility import print_error_msg
print_error_msg(e)
except ImportError:
print("please update to latest firmware")
Code Prova_basica_2:
import os, sys, io
import M5
from M5 import *
from unit import CardKBUnit
from hardware import I2C
from hardware import Pin
label0 = None
i2c0 = None
cardkb_0 = None
text = None
text2 = None
def cardkb_0_pressed_event(kb):
global label0, i2c0, cardkb_0, text, text2
text = cardkb_0.get_string()
M5.Lcd.printf(text)
text2 = str((chr(text)))
label0.setText(str(text2))
def setup():
global label0, i2c0, cardkb_0, text, text2
M5.begin()
Widgets.fillScreen(0x222222)
label0 = Widgets.Label("label0", 105, 143, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)
i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000)
cardkb_0 = CardKBUnit(i2c0)
cardkb_0.set_callback(cardkb_0_pressed_event)
Widgets.fillScreen(0xffffff)
M5.Lcd.startWrite()
M5.Lcd.setCursor(10, 40)
M5.Lcd.setTextSize(2)
M5.Lcd.print('>>', 0x000000)
def loop():
global label0, i2c0, cardkb_0, text, text2
M5.update()
cardkb_0.tick()
if name == 'main':
try:
setup()
while True:
loop()
except (Exception, KeyboardInterrupt) as e:
try:
from utility import print_error_msg
print_error_msg(e)
except ImportError:
print("please update to latest firmware")
Hello,
There is a few days ago, I wrote a similar trouble. My message was…
Hello,
I didn't think that I could feel so interested about this system! Sorry for my questions about, because I'm very unexpert.
I'm math teacher in secondary in Spain, and I want to prepare a trigonometric practice very simple.
I've used a potenciometer (angle unit), PaHUB, PbHUB, 8servos unit, and two servos: one 360º limited, and another one, 360º unlimited. Until this moment, all was right. But, I've done some little changes, I wasn't conscient that, when I erased the PaHUB unit, and I added another one, some address changed. I reviewed all the program, and I think that it should run. But, I don't know why now, when my program is running, at the end of compilation, it appears this message "E (112496) i2c: i2c driver install error".
Thank you for your attention
Please, does someone aid me?
Thank you for my poor English. Best regards!
Neus
Hello,
I didn't think that I could feel so interested about this system! Sorry for my questions about, because I'm very unexpert.
I'm math teacher in secondary in Spain, and I want to prepare a trigonometric practice very simple.
I've used a potenciometer (angle unit), PaHUB, PbHUB, 8servos unit, and two servos: one 360º limited, and another one, 360º unlimited. Until this moment, all was right. But, I've done some little changes, I wasn't conscient that, when I erased the PaHUB unit, and I added another one, some address changed. I reviewed all the program, and I think that it should run. But, I don't know why now, when my program is running, at the end of compilation, it appears this message "E (112496) i2c: i2c driver install error".
Thank you for your attention
Please, does someone aid me?
Thank you for my poor English. Best regards!
Neus