Closed drapizaaldryx closed 5 years ago
I have the same problem. The values don't change when chaning the reference_unit
.
A major refactoring was just merged. Could you pull the changes and test again? Thanks.
Also, please post your test code.
i did
with a reference_unit = 1
I got:
-31422
-31384
-31430
-31389
-59393
-31356
-31453
-31389
-31483
-31436
-31376
-31413
-31406
-31436
-31414
-31404
and with reference_unit=92 or any other number:
-31428
-31387
-31373
-31353
-31350
-31430
-31414
-31385
-31417
-31376
-31406
@Takrem1 Could you post your code, please? Thanks!
i used the example.py
I'll update README.md
and example.py
this weekend to make it clearer.
Meanwhile, in example.py
your getting the raw value from HX711 using hx.read_long()
. Comment that one and uncomment hx.get_weight(5)
.
So, change this:
# Prints the weight. Comment if you're debbuging the MSB and LSB issue.
# val = hx.get_weight(5)
val = hx.read_long()
print val
To this:
# Prints the weight. Comment if you're debbuging the MSB and LSB issue.
val = hx.get_weight(5)
# val = hx.read_long()
print val
Same issue. I'm for sure registering changes through the load cell with example.py however these values are still just erroneous long numbers because the set reference unit is having apparently no effect whatsoever upon the output?
Hey @rirons, are you using example.py
? Did you modify any lines?
Using example.py. Other than the reference unit everything is as downloaded
Hey @rirons https://github.com/rirons , are you using example.py? Did you modify any lines?
Please, read my comment just above your first one on this thread.
I'm working with a 3kg load cell and when I run
example.py
withhx.set_reference_unit(1)
it outputs:adding 2kg to the load cell changes the output to:
i used
hx.set_reference_unit(673)
since1347126 / 2000 = 673
but the output does not change after running please help :(