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

    "get Battery Level" issue

    Bug Report
    2
    4
    5.1k
    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
      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
        IAMLIUBO @rbarsa
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • R
          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
            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
            • First post
              Last post