Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ladyada
Resolves: #4
Reverting the change from #3. I think that I didn't have this wired up correctly when I tested the PR, or else the gauge I was trying to use is wrong or broken.
I got a new https://www.adafruit.com/product/4541 and have set it up with the HX711 for testing today. This time around I do get values that differ from the the Arduino library. Right now I get 3 different values respectively from:
It's not clear to me which of those different values is the correct / expected one, I don't think I could get to the bottom it very quickly, so I've opted to revert the change from #3 for now.
I found this code in the 3rd party driver which was linked in the original issue: https://github.com/fivesixzero/CircuitPython_HX711/blob/4efc13f5e69f482d9b43936077e19e5fbeb7f285/hx711/hx711_gpio.py#L72-L74 which is similar to the changes made in #3 but it uses greater than instead of
&
bitwise in the if statement.In the longer term perhaps it's worth comparing the implementation in this library with the one from https://github.com/fivesixzero/CircuitPython_HX711/tree/main to see what differences exist and determine if we can use the approach from that library if it does indeed allow for supporting non-long int builds. For me, this would require a deeper dive into the datasheet and perhaps the arduino library to try to understand which values are the expected ones.