Doesn't this work?
In micropython it would be the same as python : stringA + stringB
Simple test, 4 units, two grey, two black, using the same portB and button add on:
and it is working now. Did you update the flow?
Reading pin 36 on the black cores is not possible right now. Please fix, thank you.
When coding in grey : Wait for press of UNIT button, works, no problem
When coding in black : Wait for press of UNIT button, doesn't work. If press button A, it thinks it was a press by UNIT button
Black works with port B:
But it still recognizes the ButtonA as a unit press :| Also, can't I use the bottom with the Port B & C ?
Ok, this is a problem with the m5stack core (black). I tried in two different ones, and they had the same problem. Then I tried in two greys and they did not have the problem. Please fix this.
I was using the button unit (Port B) and it doesn't do anything. A press of the "A BUTTON" is recognized instead of the button unit.
I tried the same code in my m5stack gray and worked. Both are at v1.2.2
from m5stack import *
from m5ui import *
btn0 = units.get(units.button,units.PORTB)
a = 1
title1 = M5Title(title="Title", fgcolor=0xFFFFFF, bgcolor=0x0000FF)
a = a +1
title1 = M5Title(title=str(a), fgcolor=0xFFFFFF, bgcolor=0x0000FF)
My Button (one button) unit is not working. Pressing it does nothing, but pressing button A does what pressing button unit was supposed to do...
So, in flow:
i2c_l = i2c_bus.get(i2c_bus.PORTA)
b = str(i2c_l.readfrom(0X5E,3))
moving = b[4:6]
clicking = b[8:10]
I'm sure there's a better way to do this (with proper encoding). Clicking returns "1" if there is no clicking and "0" if there is. moving forward is 1,2,3,4,5 depending on speed and ff,fe,fd, etc... if it's going backwards.
Should be simple to do a blocky version of this!
Downloading files via urequests is easy but takes a lot of memory, I could write it with usocket, it's a little bit more complicated (for me), but would allow download of bigger python scripts/libraries via the block app. If m5stack has interest in it I could do it I think.
I have made it easy to download my proto-game:
Open this file in the m5flow thinggie http://flow.m5stack.com and run it, and it will download a file from github and save it in the apps folder, so you can try the game!