I see that Arduino supports vlw font files:
https://docs.m5stack.com/en/guide/develop_tools/vlw_font_creator
I also noticed a 'fonts' folder on the device flashed with UIFlow2 firmware.
How can we use vlw fonts in UIFLow2? Or UIflow micropython?
I see that Arduino supports vlw font files:
https://docs.m5stack.com/en/guide/develop_tools/vlw_font_creator
I also noticed a 'fonts' folder on the device flashed with UIFlow2 firmware.
How can we use vlw fonts in UIFLow2? Or UIflow micropython?
@greenleaf It appears the image plus block is very picky about file extensions. It seems sort of hit or miss. I got a file that ended in *.png working, but then another one didn't work. s🤷🏼♂️
Ok so interesting results; after letting the device run all night it did eventually get quite close to the Aranet4 readings for CO2.
Maybe I'm missing something here but both of these blocks only ever return errors for me. With the image block I can even see a preview in UIFlow but the moment I send code to the device nothing appears on screen. I've tried adjusting the layer and using different images but none of it seems to work.
I also could not get Label+ working - has anyone else?
@greenleaf Final update, it appears that if you upload the images both to the project and onto the device directly, that you can use the UIflow way to place them and resize them, etc.
I did find some weirdness with older versions of images being cached on the UI, but correct on the device.
Feature request:
Ability to set headers for Label+ objects. Many APIs required these headers before they respond with proper JSON.
Example:
curl -H "Accept: application/json" https://icanhazdadjoke.com/
Hey friends:
I made a simple sketch that displays the CO2eq and TVOC values on a display.
I have a highly accurate aranet4 to compare to. I know the sensor in the TVOC/eCO2 is not a true CO2 sensor but was curious if there's a way to adjust it to more closely match the value on the aranet4.
I'm going to let it run all night and see if it gets any closer. Right now here's what I'm seeing:
TVOC/eCO2 - 400
aranet4 - 560
The sensor seems never to deviate from 400 unless I blow on it.
Ok, I found a workaround. Here it is in case anyone else runs into this:
Ok I took a closer look - the files don't even make it onto the device at all.
Is this perhaps an unfinished feature? I would expect that when I upload files into a "project" that they end up on the device somewhere. I don't see a way in the UI to move files from the project to the device, so I have to upload them all again.
Is this by design? Or did I run into a missing feature or bug...
@felmue ok, then UIFlow 2 has a bug in it, it seems. I used the UI to upload and select the image. If it's being put in the wrong folder that is confusing for users.
@greenleaf Here's a screenshot. I've tried both a small PNG image and a small JPG image. Neither one ever shows up on the screen.
( image url)
I'm trying to build a really simple program to test the device. Unfortunately it's failing to even show a simple JPG or PNG image. What am I missing here?
def setup():
global image0, circle0, label0
M5.begin()
Widgets.fillScreen(0x222222)
image0 = Widgets.Image("res/img/mushroom.jpg", 85, 52, scale_x=1, scale_y=1)
circle0 = Widgets.Circle(45, 44, 15, 0x636eec, 0xdaf239)
label0 = Widgets.Label("mushroom", 115, 206, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)
image0.setImage("res/img/mushroom.png")
image0.setVisible(True)
For future viewers of this thread, the API key is the same as the MAC address. You can usually find this on your router config where it shows device info. The MAC is also shown in the serial output when you connect a burner device (or FTDI cable as mentioned above.
My problem was the device was stuck and needed reflashing. Once I did that it worked perfectly using the 12-digit MAC as the API key.
You may safely ignore the 8 digit "API Key" that is shown in M5burner or the command line, this was a red herring.
@felmue you are a god. I didn't want to order a $15 burning tool for my $5 m5stamp so I've been using a cheapo FTDI adapter. Connecting GPIO0 to GND worked like a charm.
When I boot in UIFlow mode this is how the serial output looks. But M5burner and esptool won't work at all...
I hooked up a FTDI adapter and am seeing these errors in the serial output. Did I get a bad board?
14:41:58.735 -> Start factory test
14:41:58.735 -> Start IO TEST
14:41:59.066 -> 18 >>>> 1
14:41:59.111 -> error HIGH-->>>OUT:26 IN:18
14:41:59.738 -> 18 >>>> 0
14:41:59.770 -> 21 >>>> 0
14:41:59.815 -> error HIGH-->>>OUT:19 IN:21
14:42:00.434 -> 18 >>>> 0
14:42:00.473 -> 21 >>>> 0
I also noticed every other device in UIFlow uses an 8 character API Key (MAC). The m5stamp is the only one that requires 12. Could this be a bug or unfinished configuration in the app?
As a last resort I tried the actual real MAC address of the device that I got from my router. That failed too, although I can see the device is definitely on the local network.
The docs suggest that the WiFi AP name doubles as your API key. But it's only 8 characters, UIFlow wants 12 characters:
I don't have the little USB adapter so was hoping to just fiddle around in UIflow to get started. Anyone know the secret to finding the API key on these? Did something change about the way it is configured?
I think I probably have a defective unit. I have tried with only a single tab open, latest version of Google Chrome, tried it incognito mode also just to be sure some extension wasn't getting in the way. Despite all efforts it never connects to UIFlow. I know it's on the network because my router is showing it connected and sending/receiving some packets.
I will probably stick with devices that have USB-C on them, this is way too much hassle and I don't want to have to rig up a programmer just to toy around with a prototyping device. Oh well, at least I'm only out $5.
Ok so the green pulsing light means "Normal, connected, ready for UIFlow"?