"get Battery Level" issue
-
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 -
Hi @rbarsa ,
Could you paste your block code picture? -
from m5stack import *
from m5ui import *
from uiflow import *
import unitsetScreenColor(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) -
When using the MQTT the simmilar problem occure. The weight value sometimes shows nonsense number.
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