I like the UIFlow firmware as it's a neat way to test small (less than a screen full of code) samples. I don't care about Blocky in particular.
In short: I like to use MicroPython primarily, but UIFlow secondarily.
However I cannot make a simple example work though:
from m5stack import *
from m5ui import *
from uiflow import *
tof0 = unit.get(unit.TOF, unit.PORTA)
for count in range(100):
lcd.print(' ', 0, 0, 0xffffff)
lcd.print((tof0.distance), 0, 0, 0xffffff)
This is the output from a very simply Blocky block. Works fine in the UIFlow UI.
But sending the same code via ampy does not work: the tof0.distance is always 0. But the screen clearing works just fine.
Is there a way to send Python code to an M5Stack with UIFlow firmware
What's the difference between running UIFlow code and the equivalent Python code?
BTW other examples with other external units work fine. So maybe this problem is limited to the ToF unit...