-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Confused with changes in the HX711 calibration constants #59
Comments
Yes, you can as the calibration and the internal code can handle / use those decimals. If you want you could round the value, 432.997039 would previously be 432 but actual 433 seems to be a better value to use. |
Thank you. Just so that I've understood this properly, its okay to use |
As said the use of floats is no problem. However it is strange that those numbers are so far apart (assuming it is the same setup) |
Not sure I understand what you mean by this. Its the same loadcell. I was surprised by the difference as well and assumed that it is because of the library updates. |
You can't break the setup so just give it a try if it gives meaningful outcomes. Q: which versions did you compare exactly? So I can investigate. |
The constants mentioned above were with version 0.5.0. The ones now are with the latest version. |
Ok, I am going to have a quick look at the changes. |
Changes between 0.5.0 and 0.5.2 (latest)
HX_calibration.ino
So in short I cannot explain your results from the changes in the code (yet, will check deeper as I have no setup) Using the same weight: |
Did you call the tare() function before calibration? |
Will do.
I used the calibration sketch from the examples. I believe it does call |
I declared the calibration constants as a float. Is that the right data type for it, or do I need to use something else? |
bool set_scale(float scale = 1.0) uses a float so float is oK |
So I tried this again right now with versions 0.5.0 and 0.5.2 and now I'm getting consistent constants in the range of 422 and 435 for two different loadcells. Not sure why I was seeing values less than 1 yesterday. My apologies for being a bother. |
No problem, Assuming there are no related questions I close this issue. |
Last year, I built a Nano project that uses the HX711 ADC to read two load cells. Based on the weight difference, it plays an audio file.
In the code below, the calibration constants were in the 400 range as shown in the code below. However, the library has been updated. During a recent calibration cycle, these constants now appear as decimals (see the calibration output at the end).
Should I update my code to include these as decimals?
The most recent calibration output is as shown below,
The text was updated successfully, but these errors were encountered: