Many have asked and therefore many will contribute.... please open source uiFlow so we (the community) can help fix bugs and add enhancements (new blocks).
world101
@world101
Electrical engineer and logical thinker that loves a challenge to figure things out. I’m a DIY/maker that likes to tinker with IoT devices and 3D design/printing. I’m not good at programming, which is why I heavily use uiFlow!
Best posts made by world101
-
[UIFlow] Open source UIFlow
-
RE: M5stack original firmware (binary)
I also flashed mine with micropython. To get it back to the factory program that came installed, I connected it to the Arduino IDE, selected Tools > Board: M5Stack-Core-ESP32. Next I opened: File > Examples > M5Stack > Basics > FactoryTest. Upload that to the m5stack and you should be back to the factory program.
If you don't have the M5Stack custom libraries, you can install it from Sketch > Include Library > Manage Libraries... Type m5stack in the filter box, select the result, and install the latest version.
-
RE: need help converting text to int (CORE2)
I think your issue is because you are using variable X within the ESP Now Receive Callback to hold the string data coming from the ESP Now transmitter device. Then within the Loop, you are trying to convert it to an integer. Upon program execution, the Python code has X=None, and is trying to convert X (which has no data yet) to an integer, thus throwing the error: can't convert noneType to int. So you have a few options. These worked for me.
-
Define X within the Setup function like this...
-
Redesign your program to perform all the calculations within the Receive Callback function. I actually prefer this option, because it doesn't require a Loop and is therefore non-blocking (no 1 second delay in the Loop). You're just waiting to receive data from ESP Now and then take action on it. However, I'm not sure what the rest of your program is supposed to achieve, so just take this into consideration.
For reference, here is my ESP Now transmitter flow. It's an M5StickC with the JoyC Hat. It sends the X position data of the left joystick, mapped from 0 to 180, so it will turn a servo connected to port A on the Core2 (the ESP Now receiver).
-
-
RE: Receiving data with ESP Now in UIFlow
Here is a simple flow that you can program on each M5StickC device that will send (Tx) and receive (Rx) a counter value using ESPNow.
I'm using broadcast to send the counter values, so will send data to all devices listening on the ESPNow network.
To make it point-to-point, you could use the "Add peer" block with the mac address of the other device within the flow and then use the "Send message with id" block to send data to only a specific device by its mac address.
If you had more than two devices on the ESPNow network, you would add multiple "Add peer" blocks (also changing the mac and ID values for each one) and multiple "Receive mac_address" blocks (also adding the specific mac you want to receive data from) to distinguish who was sending the data and who could receive the data.
Hope this helps!
-
RE: M5StickC Nixie tube Clock
I implemented the Nixie tube clock in uiFlow IDE for the M5StickC-Plus device.
https://github.com/bstein2379/M5StickC-Plus-Nixie-clockCredit goes to @macsbug for the original idea. I just made it easier for new programmers and kids by using the uiFlow IDE.
-
RE: [Solved] Poweroff M5Stack using uiflow?
Hi @sjako
There is a "Power off" block in uiFlow if your device is the M5StickC, M5StickC-Plus, or Core2 since they have the newer AXP192 power management chip.
The other M5stack devices like Core (Black), Grey, Fire, M5Go, etc. have the older IP5306_I2C power management chip with limited power functions, so the same "Power off" block does not exist in uiFlow for these specific devices. Also, when these devices are are charging with the USB-C cable plugged-in, there is no way to turn them off by double tapping the red power button on the side. Double tapping the power button just resets the device while the cable is plugged in. The USB-C cable has to be unplugged in order to turn it off. It's just a limitation of the IP5306_I2C power management chip, which is why I think M5Stacked moved away from that chip in favor of the AXP192 on newer device models.
So your options include:
-
Use the M5StickC, M5StickC-Plus, or Core2 device as your timer and use the native "Power off" block in uiFlow
-
Just turn the screen off (brightness=0) after the timer exceeds the set time. Then you could use a button callback to turn the screen back on and reset the timer.
-
Have the device go into deep sleep after the timer exceeds the set time by using the Execute block. This will essentially shutdown the M5Stack. To turn it back on, tap the red power button once and it will boot-up and start the last running program again (assuming you Downloaded the program to the device and the device is in App mode).
Hope this helps!
-
-
RE: [Solved]M5StickC firmware
@arzaman said in M5StickC firmware:
@world101 thank ,
so the same bootloader works for arduino IDE and UIflow ? if so is awesome
so what is the "original" FW that is pre-loaded?
If I udenrstand well the UIflow V1.2.3 loads on ESP32 micro python so sounds strange to me that once you have loaded the UIFlow FW you can use also with arduino IDE (C++)anyway I will try
D.
No it’s one FW or the other. The original FW should be uiFlow (MicroPython), at least for the recent hardware. The older hardware cores (M5Stack black or grey) shipped with a factory test Arduino sketch. All the newer hardware should ship with the uiFlow firmware.
Flashing the hardware with the Arduino IDE will overwrite the uiFlow firmware. To get it back to uiFlow (MicroPython), use m5burner.
-
RE: The Max value of the slider cannot be modified !
Yes, I agree this is a bug with the slider object and also the bar object in the UI simulator, but you can easily work around the bug with the
Set range min max
block until m5stack fixes it. -
UiFlow needs https
@m5stack please also configure http://flow.m5stack.com/ for https like you did for this community forum. Thanks!
-
RE: UIFlow Github project?
I feel your pain. I’ve been buying M5Stack products for more than 3 years now, after learning about the company from their Kickstarter campaign. They are such cool “complete packaged” products and nothing like it in the market right now. I just can’t stop buying things from them. However, there are some serious challenges when you really dig into the details of the products. Engineering-wise they are pretty good and so compact. Sometimes there are hardware flaws (noisy speaker, conflicting GPIOs, m5stickC battery drain, etc.), but I’ve seen a relatively low number of those over the years. Is it perfect? Nope. Lacking documentation is the biggest complaint. Personally I think they release products a bit too quickly. I’m all about fast innovation, but IMHO they should wait until all software, docs, and good examples in Arduino and uiFlow/Micropython are ready. But their slogan is “ideas fast tracked” not “IoT products for retail and commercial solutions.” So you have to take the good with the bad I guess. 🤷🏼♂️
If you care to share your feedback, they released a customer survey here:
https://m5stack.com/blogs/news/m5stack-customer-survey-2021
Latest posts made by world101
-
RE: [Core2] How to disable speaker tone during booting / power-up?
Ugh. The early uiFlow firmware way back in version 1.2 (I think) had a dreaded startup beep… it sounded different, but was still annoying. I put in a request years ago and they eventually turned it off by default and then eventually you could control the on/off in the settings. Looks like they brought it back with no way to turn it off ☹️
-
RE: [MQTT-Core] Support for RETAIN
What all have you tried and are you using uiFlow or Arduino?
I'm pretty sure they implemented it a while back, as I originally requested it more than a year ago. I haven't tested it recently, but I believe it was working before. Let me do some digging and I'll see what I can come up with.
-
RE: M5Burner for Mac seems to lack Stamp support
It's showing on my M5Burner v2.3.0. It's called Pico but has Stamp in the description.
-
RE: m5stickC plus No Sound/Beep
Works for me. Tested originally on uiFlow v1.7.8 and also flashed my M5StickCPlus to the latest v1.8.2. Both tone and beep are working quite well. Yours might be hardware related.
-
RE: GRBL13.2 firmware version
@ksprayberry
Sorry! Got your message and then became quite busy. I created a quick GitHub repo here:
https://github.com/bstein2379/m5stack-grbl-uiflow -
RE: My old m5f file could not open with new uiflow web why?
@desarrollogis, @Mustafaturgut, and @felmue
I have a workaround until @m5stack fixes it on the server side. The error was introduced because of the new Remote+ blocks in v1.8.0. So to fix your old file, open the .m5f file in a text editor and manually edit it. The bottom of the file should look like this, with the Blockly.RemotePlus section being the new code. You should also test your new file in a JSON validator to ensure you have the right syntax (commas in the right place, etc.). You might have code in the modules section if your program uses any modules.
"Blockly.Remotes": [], "Blockly.RemotePlus": [ { "createTime": 1625322052382, "name": "M5Remote", "dragAndDrop": false, "resizable": false, "color": "#fff", "bgColor": "#0080FF", "type": "title", "id": "__title" } ], "modules": [] }
I have only done a quick test of this workaround to ensure the file loads on uiFlow web IDE v1.8.0 and that I can also download the new file to my device. Seems okay for now, but there are some additional Blockly deprecation messages in the Chrome developer tools console that concern me.
Edit: looks like someone beat me to it. The workaround was also mentioned here but I didn’t see it.
https://community.m5stack.com/topic/3428/uiflow-1-8-0/2 -
RE: My old m5f file could not open with new uiflow web why?
Thanks for the heads up to not give v1.8.0 a try yet. Looking at the Chrome Developer Tools console, this is the error...
TypeError: Cannot read property 'map' of undefined at l.openM5F (main.0403ae3b639489d97cfe.js:1) at l.M5F_create (main.0403ae3b639489d97cfe.js:1) at FileReader.e.onload (main.0403ae3b639489d97cfe.js:1) at t.invoke (polyfills.f72bb0aeb8864eb8b3c6.js:1) at Object.onInvoke (main.0403ae3b639489d97cfe.js:1) at t.invoke (polyfills.f72bb0aeb8864eb8b3c6.js:1) at e.runGuarded (polyfills.f72bb0aeb8864eb8b3c6.js:1) at FileReader.<anonymous> (polyfills.f72bb0aeb8864eb8b3c6.js:1)
@m5stack please fix and while you are at it, include multiple beta versions to choose from on the uiFlow web IDE to help avoid situations like this.... or do more thorough testing before releasing!
-
RE: GRBL13.2 firmware version
I made some progress today using the Faces kit with keyboard module to send grbl control commands (like $) over ESPnow to the other Core with the GRBL module attached to it. It will print on the screen the received command, write the gcode, and print the grbl response from the ATmega328.
I also have some uiFlow blocks configured to read a gcode file from the SD card, line by line, and write each line to the GRBL module. I have one step motor connected to the X axis of the GRBL module and it spins the motor for each gcode line, so something is working so far! I need to order more step motors so I can build out a 3 axis machine.
Not sure if you have the Faces kit or not, but I can post my uiFlow code here tomorrow if you are interested in any of it.
-
RE: GRBL13.2 firmware version
Here you go...
Results from the serial monitor after booting and then pressing button A, which sends $ for help:
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:5280 ho 0 tail 12 room 4 load:0x40078000,len:13424 load:0x40080400,len:3568 entry 0x4008063c _ __ _ _ _(_)/ _| | _____ __ | | | | | |_| |/ _ \ \ /\ / / | |_| | | _| | (_) \ V V / \__,_|_|_| |_|\___/ \_/\_/ APIKEY: -------- Grbl 0.8c ['$' for help] ok $$ (view Grbl settings) $# (view # parameters) $G (view parser state) $N (view startup blocks) $x=value (save Grbl setting)
Note: I have not been able to connect directly to the module yet (i.e. to type $ for help, $x to set values, etc.). That's why I used button A to send that Gcode command. With the serial monitor (I'm using Terminal on the Mac), you are connecting to the Core (ESP32) and not the ATmega328 on the GRBL module. The Core and GRBL module communicate via i2c at address 0x70 (or 0x71 depending on the dip switch). However, with the blocks m5stack has provided in uiFlow, you can send any command via the
Write G-code
block. I will continue to experiment, but I would still like to upgrade the module to grbl 1.1 if possible.