Use UiFlow IDE to write code. Is this the correct Method?



  • So you can use UiFlow IDE to write code. The question is how do you save the code and how do you get the code into the M5Stack device? You have three options to "save " the code.

    1. Using the "save" button UiFlow IDE can save the code to your hard drive. UiFlow calls this a Project and UiFlow IDE saves this with a .M5F file extension. This allows you to continue working on your Project at a later date.
    2. Using the "download" button UniFlow IDE saves the code permanently to the Apps directory on your M5Stack device and gives it a .py extension. This allows you to run/test your code on the M5Stack device.
    3. Also there is a "run" button in UiFlow IDE. At any time you can use the "run" button to test the code you are working on. This will send the code to the M5Stack device but it is not permanent.

    So the technique to developing code for the M5stack device using the UiFlow IDE is.......
    Write the code using blocks and or MicroPython in the UiFlow IDE, save your Project to your hard drive for future use then 'download' your code direct to the M5Stack device.



  • Option 2 works so that it additionally saves your .m5b project in the / block or / blocks folder on the device and simultaneously the generated micropython code in the / apps folder on the device.

    In uiflow ide you can download your project from the device again to uiflow (the icon next to the button, run "device file manager") and continue editing and make changes.

    I generally use 3 options until the program works as I want and then I finally load it to the device using the "download" option.

    Coming back to the first option, only the project is saved, i.e. the block arrangement and their parameters. No python code is written anywhere, as it is automatically generated in the uiflow environment and saved only in the second and third cases.
    In the third case, only a temporary .py file is saved and launched on the device, but it is not visible in the list of applications. This file stay in flash until its rewriten by next use "run" button.