If you are using firmware version 1.7.1 then I suggest trying version 1.7.0 because in 1.7.1 the power to external devices are off when the device is powered on and even if you use the "Set bus power mode" block it is trying to initialize your "Units" before they get any power and this will cause problems like this.
It is possible to enable power before the Units are initialized if you switch to the python tab... but this should be fixed in a new firmware release.
Posts made by Ove
-
RE: [Core2] UiFlow - BOTTOM2 support
-
RE: UIFlow 1.7.1
I installed UIFlow_Core2 version v1.7.1_core2 on my Core2 and now I have no power on port A.
If I add "power.setBusPowerMode(0)" in the Python tab before any Units are initialized the power is returned but I can not do this with blocks.
The power is restored until the Core2 is reset. -
RE: How to power M5Core2 from module?
Thanks for the code @felmue!
I have updated my Servo2 custom block with a new "Servo2 enable external power" block... and it can be found here: https://gitlab.com/ove.risberg/uiflowblockservo2
-
RE: UIFlow custom module for Servo2
I have added one more block for enabling power from Servo2 module and the new Servo2.m5b can be found here: https://gitlab.com/ove.risberg/uiflowblockservo2
You still need the battery in M5Core2 or USB cable connected since the current firmware is turning off external power shortly after boot so your M5 will poweroff if no USB cable or the internal battery is connected... if the new "Servo2 enable external power" block is used the external power is enabled and you can disconnect the USB cable.
The internal battery should be charged by the external power after the new "Servo2 enable external power" block is used.
Thanks to @felmue for the code used in the new "Servo2 enable external power" block!
-
How to power M5Core2 from module?
How can I power my M5 Core2 from Servo2 module?
@felmue wrote in "Core2 portable CO₂ sensor" that one could run "M5.Axp.SetBusPowerMode(1);" but how do I do this in UIFlow or Micropython?
-
UIFlow Block tools
UIFlow Block files can be created with http://block-maker.m5stack.com/ but the block code window is small and this is not optimal if you want to create larger blocks. The java script code is visible on the right side of the screen and you can type in that window but your changes are lost as soon as you do anyting on the left side. If you want to compare two m5b files it is hard because they only contain one very long line and most diff tools are not good at comparing just one line.
I have made two simple python scripts to convert m5b files to the java script code you see in the right side of the screen and back so it is easier to make large blocks and to compare changes. These scripts are only tested on Linux with python3 installed.
The scripts can be found here: https://gitlab.com/ove.risberg/uiflowblocktoolsUIFlow Block Maker is still in beta so the limitations above may change in the future and my scripts may stop working because the m5b format can change so use these tools on your on risk.
-
UIFlow custom module for Servo2
I could not find any support for Servo2 module in UIFlow so I created a Custom UIFlow module
https://gitlab.com/ove.risberg/uiflowblockservo2
This module was created for Core2 but if the i2c pins are modified it should also work on older Cores.
I hope to make this configuration automatic in future versions of Servo2.m5b