Edit: I haven’t seen an update on easyloader yet for OSX. In the meantime, use Arduino or uiFlow to program the Atom and m5burner to flash the firmware.
Posts made by world101
RE: PlatformIO Projects for BugC and Joystick + 2 M5StickCs using ESP-Now
Great! Would love to see a demo video of it in action.
RE: HttpPost using UIflow
@franco what is the m5stack device is talking to? It appears to be a web server or similar, but what is it? Also, I would recommend adding another label to the m5stack/m5stickC to get the HTTP status code. This would give an indication if the flow is timing out (no response or eventually failure after the timeout period) or what the response is with the HTTP error code (see this link for a list of error codes).
Also, you showed two http addresses above, http://184.108.40.206:8084/?onx and http://192.168.1.123/?offx. I assume one is on a public network and the other is on your private/local network. So you would also need to make sure the servers are not blocking traffic from the network the m5stack/m5stickC is on.
RE: UIFlow 1.6.1
Thanks for adding NTP support!
Edit #1: it seems like NTP isn't working for me on the StickC with a very basic flow...
The REPL error:
Traceback (most recent call last): File "flow/m5cloud.py", line 76, in _exec_fun File "<string>", line 23, in <module> NameError: name 'ntptime' isn't dUnhandled eefined xception in thread started by <bound_method> Traceback (most recent call last): File "flow/m5cloud.py", line 120, in _msg_deal_task AttributeError: 'M5TextBox' object has no attribute 'ticks_ms'
Edit #2 -- workaround:
I think the Init nttptime with host block needs to call "import ntptime" first. I fixed it by adding an execute block before the init. NTP works now.
RE: .m5f files only partially loading
@Devilstower see what I wrote here to see if it helps you.
If not, open the Chrome developer console and see what error is thrown when loading the m5f file in uiFlow.
RE: m5f file not loading anymore
@nash68 I fixed it. In the file, I just replaced
screen_set_brightnessand now it works.
RE: m5f file not loading anymore
I had the same happen to me recently. Some of my files were created a few months ago, but no longer work now. Looking at the Chrome developer console, there is this error when loading your file into uiFlow.
TypeError: Unknown block type: screen_set_stickc_brightness at Blockly.BlockSvg.Blockly.Block (scripts.3a80ddb4e78f6cf0af09.js:1) at new Blockly.BlockSvg (scripts.3a80ddb4e78f6cf0af09.js:1) at Blockly.WorkspaceSvg.newBlock (scripts.3a80ddb4e78f6cf0af09.js:1) at Object.Blockly.Xml.domToBlockHeadless_ (scripts.3a80ddb4e78f6cf0af09.js:1) at Object.Blockly.Xml.domToBlockHeadless_ (scripts.3a80ddb4e78f6cf0af09.js:1) at Object.Blockly.Xml.domToBlock (scripts.3a80ddb4e78f6cf0af09.js:1) at Object.Blockly.Xml.domToWorkspace (scripts.3a80ddb4e78f6cf0af09.js:1) at t.openM5F (main.5558dcaebe084d12c3eb.js:1) at t.M5F_create (main.5558dcaebe084d12c3eb.js:1) at FileReader.n.onload (main.5558dcaebe084d12c3eb.js:1)
I see the same error with my file. So something seems to have changed on the uiFlow side related to the StickC brightness block. @m5stack, please investigate this.
RE: cardkb GetKey comparison
getKey seems to return a hex value not decimal. So your if condition = 180, 181, 182, 183 is not being satisfied and the do is never executed. Try converting hex to decimal first, before your if statements. Or you can try comparing on the string values B4, B5, B6, B7 or 0xB4, 0xB5, 0xB6, 0xB7. I don’t have a CardKB to test with, so it might take some trial and error.
RE: Adding an app to my App List on v1.5.2 M5Stack Fire
...can download and run it on the M5Stack Fire
Are you sure you used the Download button within uiFlow and not the Play/Run button?
There is a 1-second timeout after boot up that allows the user to press the App, " : ", and Setup buttons. When you use the Download feature within uiFlow, it will download your app to your device, and then it should show up in the App list. Be sure to rename your Project name from "main" in the upper left of uiFlow so you can distinguish it from other apps. If not, it will overwrite main.py each time.
For deleting apps within the Apps menu, in v1.4.5.x you would hold the ▼/DEL button to delete them. However, I think there is a bug in v1.5.x and there is not an option to delete. You will need to delete them manually from the /flash/apps directory by using ampy, Thonny, etc.
RE: Silicon labs CP210x driver not working on my Mac with Catalina OS( version 10.15.4)
I have these archived files on my Mac if you want to try them:
SiLabsUSBDriverDisk.dmg dated Jan 6, 2018
SiliconLabsUSBDriverDisk.dmg dated Jan 23, 2018
If you want to try the files, Direct Message your email and I'll email it to you.
I'm on Catalina 10.15.4 and have no issues burning any of my M5stack products (grey core, fire core, m5stick, m5stickC, atom matrix). I always use the official Apple USB-C Digital AV Multiport Adapter on my 2015 MacBook Pro and a USB-A to USB-C cable (sometimes reversing the USB-C side orientation (i.e. "flip it over") if the driver doesn't seem to detect the device).
It may be due to the fact that I installed the Silicon Labs drivers many years ago when I first started the M5stack journey. However, along the way, there have been issues with OSX that have required me to fix/patch things.... most recently with the m5stickC/m5atom driver patch (Solution2 from this thread).
RE: How to acquire and upload demo app?
What do you use to transfer files both ways?
I use Adafruit ampy because it supports get and put to transfer files both ways. You could also try the Thonny IDE that @lukasmaximus mentioned in the other thread. I haven’t tried that yet.
I did try Mu IDE today with an m5stickC running the mainline MicroPython v1.12 firmware, but I wasn’t successful getting the REPL to work. It didn’t seem to detect the serial port connection to the m5stickC. However, Mu REPL did work for me with an M5Stack core running uiFlow v1.5.0 though.
RE: How to acquire and upload demo app?
I'm on a Mac and I use the OSX Terminal and the screen utility to access the REPL. On Windows, you might need to use Putty or something similar. With the uiFlow firmware burned to your m5stickC you can access the REPL.
screen /dev/tty.usbserial-514A6FFF41 115200
Once I'm in the screen session, I press Ctrl+C a few times to get to the REPL prompt. In the output below, I'm pressing Ctrl+C after it says "start m5ucloud monitor":
MPY: soft reboot I (683470) [TFTSPI]: attached display device, speed=8000000 I (683470) [TFTSPI]: bus uses native pins: false [ M5 ] node id:d8a01d698f30, api key:6501754B start m5ucloud monitor Unhandled exception in thread started by <bound_method> Traceback (most recent call last): File "flowlib/lib/time_ex.py", line 69, in timeCb KeyboardInterrupt: Traceback (most recent call last): File "flow_usb.py", line 28, in <module> File "flowlib/m5ucloud.py", line 45, in run File "flowlib/lib/time_ex.py", line 69, in timeCb KeyboardInterrupt: MicroPython v1.11-321-gac7da0a70-dirty on 2020-02-25; ESP32 module with ESP32 Type "help()" for more information. >>> >>> >>> import os >>> os.listdir() ['image_app', 'flow_usb.py', 'config.json', 'main.py', 'res', 'boot.py', 'img', 'config.py', 'flow.py', 'blocks', 'apps', 'debug.py'] >>> >>> f = open('main.py') >>> f.read() 'from m5stack import *\nfrom m5ui import *\nfrom uiflow import *\n\nsetScreenColor(0x111111)\n\nlabel1 = M5TextBox(24, 70, "TEST", lcd.FONT_Default,0xFFFFFF, rotate=0)' >>> >>> f.close() >>> >>>
In the above example, I open the main.py file (which is the 'test' app I think you are referring to) and read it to the REPL output. You can use other text editors to create your MicroPython programs and upload them to the m5stickC using ampy or another utility. Just save the file as main.py, upload it to the m5stickC and it will run after boot.py.
Here is a good resource to look through.
RE: MicroPython Firmware with M5Stack libraries
@world101 is there one for M5StickC? The sample codes are for the larger model.