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

    M5Station-485 - Get Battery Percentage - NameError

    UIFlow
    3
    4
    4.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.
    • felmueF
      felmue
      last edited by

      Hello @m5stack

      when I try to use the Get Battery Percentage Vmin / Vmax block (UIFlow 1.10.4)

      0_1661586675874_M5StationUIFlowBatPercentError_20220827.png

      I get the following error:

      Traceback (most recent call last):
        File "flow/m5cloud.py", line 76, in _exec_fun
        File "<string>", line 28, in <module>
      NameError: name 'map_value' isn't defined
      

      Thanks
      Felix

      GPIO translation table M5Stack / M5Core2
      Information about various M5Stack products.
      Code examples

      ajb2k3A 1 Reply Last reply Reply Quote 1
      • D
        democrazia
        last edited by

        Hi,

        Did you added "from easyIO import * " at the beginning ?

        Fred

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

          @felmue There is no batteries in the Station485
          However you may have also found a bug.

          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 2
          • felmueF
            felmue
            last edited by felmue

            Hi guys

            @democrazia : thank you, adding from easyIO import * solved the issue. Thank you!

            @ajb2k3 : you are correct, the 485 stock version doesn't have batteries. However I don't think M5Stack engineers are planning to separate the two versions in UIFlow as there is only one M5Station to select from in UIFlow. So yes, it is a bug - instead of the error we should get 0.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

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