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

    Upload program to M5

    General
    3
    6
    8.5k
    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.
    • T
      tnesheim
      last edited by

      Hi. I have successfully made a program on UIFlows using wifi connection and the API-key. I press the "play" button in the UIFlow and the program executes. But when I remove power and reboot the M5Stack the program is gone. I have tried the "download" in the UIFlow menu that makes the M5 screen say "upload", but I end up with the same and the M5 shows the API key and the QR-code. What should I do to make my program stick to the M5 and execute after inital bootup?

      lukasmaximusL 1 Reply Last reply Reply Quote 0
      • lukasmaximusL
        lukasmaximus @tnesheim
        last edited by

        @tnesheim very cool, could you share the code with us? I'm still trying to figure out how to use the http request blocks. I've heard this is an issue also with programs with the remote blocks too where the downloaded version doesn't work with the internet connection part. Did you do the wifi setup procedure in blocks? as in this forum post
        http://forum.m5stack.com/topic/1345/uiflow-http-request/4

        Alternatively if that doesn't work you can copy and paste the python into a .py script, rename it to boot.py or main.py and then transfer it to the flash of the device with ampy or vscode

        1 Reply Last reply Reply Quote 0
        • T
          tnesheim
          last edited by tnesheim

          I'll post a screen dump of my blocks/code tonight. I used the code generator; https://www.blitter.se/utils/basic-authentication-header-generator/ to generate a key to insert in the header instead of using explisit username/password.

          Aha...of course, I need to set up the wifi in the program itself:-) I'll definitely try that when I get home.

          1 Reply Last reply Reply Quote 0
          • T
            tnesheim
            last edited by

            Also, in respect of making my program "stick" it could be a problem that I use the web connection? I should probably make the USB-connection work with my desktop version of UIFlow?

            1 Reply Last reply Reply Quote 0
            • T
              tnesheim
              last edited by

              Yes, switching to USB connection made the program "stick". Attached is a snapshot of my M5-to-HC2 block:
              0_1574182633047_49c448c4-3495-4bf8-a581-71cb906744a7-M5toHC2.jpg M5toHC2.jpg

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

                @tnesheim The QR code is pointing to the webpage created in your code that is hosted on a temp server on 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
                • First post
                  Last post