question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

changing the hx.set_reference_unit() value in example.py doesn't do anything

See original GitHub issue

I’m working with a 3kg load cell and when I run example.py with hx.set_reference_unit(1) it outputs:

55372
55334
55426
55433
55350
55411
55342
55459
55441
55514
55469
55432
55462
55399

adding 2kg to the load cell changes the output to:

1347015
1347079
1347217
1347085
1347154
1347143
1347165
1347071
1347179
1347080
1347089
1347133
1347182
1346994
1347174
1347168
1347150
1347136
1347186
1347048
1347081
1347139
1347240

i used hx.set_reference_unit(673) since 1347126 / 2000 = 673 but the output does not change after running please help 😦

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tatobaricommented, Feb 19, 2019

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
0reactions
tatobaricommented, Feb 28, 2019

Please, read my comment just above your first one on this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reference unit and settings · Issue #21 · tatobari/hx711py
The first time, make sure that the reference unit is 1 by using hx.set_reference_unit(1) . To get the new reference unit, run run...
Read more >
Cisco HyperFlex Systems Troubleshooting Reference Guide, 4.0
Login to the command line of the HX Data Platform Installer VM. For example, use ssh . Step 2. Verify the DN servers...
Read more >
Python User Interface - MEEP Documentation - Read the Docs
Once the fields/simulation have been initialized, you can change the values of various parameters by using the following functions (which are members of...
Read more >
Line Integrals and Green's Theorem 1 Vector Fields (or vector ...
Let F(x, y) = (x2y, x − 2y) and let C be the curve r(t) = (t, t2), with t running from 0...
Read more >
Build a digital Raspberry Pi Scale (with Weight Sensor HX711)
This reference unit is the divisor, but we must first find it out in the next step. Meanwhile you can run the example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found