🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UIFlow web IDE error after using timer: "Upload code failed"

    UIFlow
    4
    12
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kurikoK
      kuriko
      last edited by

      Hi @mb ,
      Have you tried uploading the program via serial?

      Good morning, and welcome to the Black Mesa Transit System.

      robskiR M 2 Replies Last reply Reply Quote 0
      • robskiR
        robski @kuriko
        last edited by

        @mb is device showing as connected still after first "run"? usually should be but if you use upload then wifi block should be included in the code so unit is connected to network, can you try same with uiflow2?

        M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ

        M 1 Reply Last reply Reply Quote 0
        • ajb2k3A
          ajb2k3 @mb
          last edited by

          @mb This is normal and all you have to do is press the reset button on the core2.
          The running program overrides the firmware and blocks accesses to the UIFlow server .

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          1 Reply Last reply Reply Quote 0
          • M
            mb @robski
            last edited by

            @robski The device is still connected when I run a "regular" program. It seems still to be connected when running a program with timer or while true: sleep(1), but as soon as I press "Run", the Connected turns into Disconnected.

            @kuriko Wanted to try serial, but pressed the "Download" button to save the file. Instead it uploaded the program to the device. Funnily it said first "Upload failed", on second try it was successful. So the naming convention (meaning) seems to be different, even within UIFlow ;-) I would have expected for "Download" to save the file to computer, and rather have something like "Upload" to save it as main program on device. MAybe I try this later

            @robski Upgraded to UIFlow 2, was surprised to need to register and bind the device. Can't find a button element, cant find a timer, neither software nor hardware.

            @ajb2k3 I am aware to be able to reset the device to re-run, but that's not the point. I can edit end re-run a program via WiFi many times. Just the use of timer or while true: sleep(1) seems to disable the Wifi connection or the internal software to receive updates from UIFlow web IDE.

            Will continue to investigate in an hour or so.

            robskiR 1 Reply Last reply Reply Quote 0
            • robskiR
              robski @mb
              last edited by

              @mb button, timer etc needs to be added in left hand menu below controller image "software/hardware" in manner you would add module or unit

              M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ

              M 1 Reply Last reply Reply Quote 0
              • M
                mb @robski
                last edited by

                @robski Found and added RTC and Timer. In UIFlow v2 the WiFi connection still works when using the timer and updating a label every second. I can still update and run code.

                UIFlow2-web-IDE-timer.png




                I started with M5Stack hardware in 2020 and I am a bit surprised that some functions are still not there in 2024 in UIFlow:

                • It seems UIFlow2 lost the "Touch Button" in the GUI designer using rounded rectangle with text and on_touch event.

                • It seems there is no way to design multiple screens or views. It's great to have a graphical GUI designer, but how can you only have one single view and not be able to switch between multiple in designer and via code?

                • It seems there are no graphics functions in UIFlow v2. I want to programmatically draw an analogue clock (circle, 12x dashes, 3x hands), that seems not possible anymore.

                • When using graphics functions, it would be great to be able to draw on screen or on a virtual screen, then updating the real screen as a whole.

                Should I create separate "feature requests" for those things?

                robskiR 1 Reply Last reply Reply Quote 0
                • robskiR
                  robski @mb
                  last edited by

                  @mb you can use hide/show/set based on condition for items on different screens,
                  I would recommend "VolosR" github/YT for UI design approach but this is arduino mostly, also there is block to run your code in blockly

                  M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ

                  1 Reply Last reply Reply Quote 0
                  • M
                    mb @kuriko
                    last edited by

                    @kuriko So I have downgraded to UIFlow v1 firmware on the Core2 again. I started the UIFlow web IDE in Chrome, expected it to have some web serial support (like CircuitPython has a web flasher), but I can not find any settings for USB or serial.

                    The download page (link) states "Desktop IDE MacOS (update is terminated)", so do I need to run "UIFlow Local Server for MacOS"? The regular UIFlow web IDE only supports WiFi connection?

                    The local m5burner software worked without a problem with USB /tty.usbserial.

                    kurikoK 1 Reply Last reply Reply Quote 0
                    • kurikoK
                      kuriko @mb
                      last edited by

                      @mb
                      Yes, what I mean is that Terminal (Beta) orange button. After clicking the connect button, your browser will ask the serial connection and directly send microPython lines to your device via serial. Maybe you can try this to eliminate the network problem.

                      Good morning, and welcome to the Black Mesa Transit System.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        mb @kuriko
                        last edited by

                        @kuriko Wow, this is cool! Core2 UIFlow v1 is in WiFi mode, but with "Terminal (Beta)" I can connect over the USB serial console. The play button will upload and run the current script, even with timers.

                        Would be very cool if the whole UIFlow web IDE had a setting to just connect via cable. Or if the Terminal play button could be placed somewhere in the IDE, without having the terminal window open all the time.

                        Side note: The regular UIFlow web IDE play button now shows a green success message "Execute code successfully" when clicked, but the code is actually not running on the device. Either it's not uploaded or not restarted.

                        ajb2k3A 1 Reply Last reply Reply Quote 0
                        • ajb2k3A
                          ajb2k3 @mb
                          last edited by

                          @mb UIFlow Web predates WEB USB.
                          You need to use UIFLOW2 for WEB USB

                          UIFlow, so easy an adult can learn it!
                          If I don't know it, be patient!
                          I've ether not learned it or am too drunk to remember it!
                          Author of the WIP UIFlow Handbook!
                          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post