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

    "get Battery Level" issue

    Scheduled Pinned Locked Moved Bug Report
    4 Posts 2 Posters 6.6k Views
    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.
    • R Offline
      rbarsa
      last edited by

      Hi, I am using the 24bit HX711 connected on port A to measure the weight from sensor. All works, but when call the "get Battery level" , the measurement show nonsense number and stop working. Any idea ?

      Device: M5Stack core
      firmware: v1.8.3 (via M5Burner)
      UIFlow: v1.8.3

      IAMLIUBOI 1 Reply Last reply Reply Quote 0
      • IAMLIUBOI Offline
        IAMLIUBO @rbarsa
        last edited by

        Hi @rbarsa ,
        Could you paste your block code picture?

        1 Reply Last reply Reply Quote 0
        • R Offline
          rbarsa
          last edited by

          from m5stack import *
          from m5ui import *
          from uiflow import *
          import unit

          setScreenColor(0x222222)
          weigh_1 = unit.get(unit.WEIGHT, unit.PORTA)

          proc = M5TextBox(90, 46, "proc", lcd.FONT_DejaVu40, 0xFFFFFF, rotate=0)
          gram = M5TextBox(128, 125, "gram", lcd.FONT_DejaVu40, 0xFFFFFF, rotate=0)
          label2 = M5TextBox(0, 46, "Bat:", lcd.FONT_DejaVu40, 0xFFFFFF, rotate=0)
          label3 = M5TextBox(0, 125, "Wght:", lcd.FONT_DejaVu40, 0xFFFFFF, rotate=0)

          weigh_1.zero()
          while True:
          gram.setText(str(weigh_1.weight))
          proc.setText(str(power.getBatteryLevel()))
          wait_ms(2)

          1 Reply Last reply Reply Quote 0
          • R Offline
            rbarsa
            last edited by

            When using the MQTT the simmilar problem occure. The weight value sometimes shows nonsense number.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post