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

    Can't get M5Stack to work properly

    SOFTWARE
    3
    22
    55.9k
    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.
    • world101W
      world101
      last edited by world101

      For reference, here is a picture of the error in the Chrome developer console on the original (non-fixed) file...

      Turn the developer console on:
      0_1597774966878_Screen Shot 2020-08-18 at 2.05.08 PM.png

      After I open the file in uiFlow:
      0_1597774905251_Screen Shot 2020-08-18 at 2.19.33 PM.png

      The file at least loads partially. I'm seeing some blocks, but none of the UI labels are showing up on the UI simulator due to the error. So check the Chrome developer console to see if there are other errors you see.

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

        It looks like something else was changed In the UI code.

        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
        • J
          JustSomeGuy
          last edited by JustSomeGuy

          Yup. Managed to upload and changed the wifi and webpage data, but somethnig is still screwy.

          No glucose display, the only thing all 3 bottuns affect is screen brightness.

          basically my screen displays:

          SGVIabel (in big letters with DiffSCVI over it)
          datalabel
          screen brghtness
          direction label

          and nothing I press or do does anything. Wifi did connect and webpage data is correct.

          J 1 Reply Last reply Reply Quote 0
          • J
            JustSomeGuy @JustSomeGuy
            last edited by

            Anyone knows what the issue is this time?

            world101W 1 Reply Last reply Reply Quote 0
            • world101W
              world101 @JustSomeGuy
              last edited by

              @justsomeguy

              It's still working for me. What region of the world are you are in?
              Can you access the data with a browser? https://tillierscout.herokuapp.com/api/v1/entries?count=1

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

                "SGVIabel (in big letters with DiffSCVI over it"

                This usully means that you have the same label set for both out puts or the same screen location for both labels.

                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
                • J
                  JustSomeGuy @world101
                  last edited by JustSomeGuy

                  @world101 Yours? Yes. But I'm accessing the nightscout for my niece: https://lmnightscout.herokuapp.com/api/v1/entries?count=1

                  Region is Europe, Croatia to be more precise

                  world101W 2 Replies Last reply Reply Quote 0
                  • world101W
                    world101 @JustSomeGuy
                    last edited by

                    @justsomeguy

                    Ah, okay. It's not actually my data. It is Chris-O's (author of the program). I thought you were still trying to get the app working with Chris' API and couldn't access his data feed (due to some firewall blocking issue, geolocation blocking, etc.).

                    Let me see if I can figure out how to get his program working with your niece's data feed. Her feed seems to be only missing the dateString, but I'm not sure he's using that anyway. I'm curious though, what does "Tomato" mean in her data feed? Chris' data feed has "share2" at the end.

                    1 Reply Last reply Reply Quote 0
                    • world101W
                      world101 @JustSomeGuy
                      last edited by world101

                      @justsomeguy

                      I got it working now with her data feed and also made a few improvements to the program. Here you go:
                      uiFlow file
                      MicroPython file

                      Don't forget to change the wifi settings before running on the device.

                      1 Reply Last reply Reply Quote 0
                      • J
                        JustSomeGuy
                        last edited by JustSomeGuy

                        Seems to work now.

                        Just one final question - how do I get the values in mmol (as they are on the Nightscout).
                        I assume it's the SVG value and I saw no conversion in the code itself, which means the SVG is the value in whatever units are used in the US?

                        Can I just edit a line like this (bolded is changed):
                        SGVlabel.setText(str((str('') + str(round(sgv / 18),1))))

                        Also, I see no alarm sounding in the code, so I added
                        speaker.sing(240, 10/16)
                        right under the svg value check for color. Can anyone tell me what the two values represent? I want it really loud.

                        world101W 1 Reply Last reply Reply Quote 0
                        • world101W
                          world101 @JustSomeGuy
                          last edited by world101

                          @justsomeguy said in Can't get M5Stack to work properly:

                          Seems to work now.

                          Just one final question - how do I get the values in mmol (as they are on the Nightscout).
                          I assume it's the SVG value and I saw no conversion in the code itself, which means the SVG is the value in whatever units are used in the US?

                          Can I just edit a line like this (bolded is changed):
                          SGVlabel.setText(str((str('') + str(round(sgv / 18),1))))

                          Yes. Chris-O's dashboard displays the SVG value in mg/dL and it looks like the conversion between mg/dL and mmol/L is to divide mg/dL by 18. So you got it.

                          Also, I see no alarm sounding in the code, so I added
                          speaker.sing(240, 10/16)
                          right under the svg value check for color. Can anyone tell me what the two values represent? I want it really loud.

                          speaker.sing(frequency, beats) where beats are: 1/16, 1/8, 1/4, 1/2, 1, 2, or 4
                          you could also do speaker.tone(frequency, duration) where duration is time in milliseconds

                          For loudness you want speaker.setVolume(int) where int is 0 (no sound) to 1 (full/highest volume). 0.5 is half volume.

                          1 Reply Last reply Reply Quote 0
                          • J
                            JustSomeGuy
                            last edited by JustSomeGuy

                            Well,...

                            I got everything working...and then I accidently hit ERASE in M5 Burner (ended up uploading a dozen different version of the app trying to get it to work, and read that you only delete apps trough the burner) and now the entire thing is DEAD, doens't react to anything anymore.

                            …
                            I have no words.

                            world101W 1 Reply Last reply Reply Quote 0
                            • world101W
                              world101 @JustSomeGuy
                              last edited by

                              @justsomeguy

                              Don't be discouraged. It's somewhat hard to brick the m5stack devices. Just do erase again (to be sure), next burn uiFlow v1.6.2 firmware, and then load the latest known working version of your program.

                              There used to be a way to delete apps from the App menu on the device, but that functionality has been lost in the last few revs of firmware (not sure why). What I typically do is connect to the REPL and manually delete what I want from the /flash/apps directory on the device. Or you could use Thonny or Mu IDE to do the same.

                              1 Reply Last reply Reply Quote 0
                              • J
                                JustSomeGuy
                                last edited by

                                Thank you again. It works (again)!

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