Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Revert longint #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Revert longint #5

merged 2 commits into from
Feb 4, 2025

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Feb 3, 2025

@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.

@FoamyGuy FoamyGuy merged commit 1b63515 into adafruit:main Feb 4, 2025
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 4, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_AHTx0 to 1.0.25 from 1.0.24:
  > Merge pull request adafruit/Adafruit_CircuitPython_AHTx0#23 from jposada202020/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_BH1750 to 1.1.14 from 1.1.13:
  > Merge pull request adafruit/Adafruit_CircuitPython_BH1750#12 from jposada202020/adding-displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_DPS310 to 2.1.17 from 2.1.16:
  > Merge pull request adafruit/Adafruit_CircuitPython_DPS310#30 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_HX711 to 1.0.5 from 1.0.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_HX711#5 from FoamyGuy/revert_longint

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS2MDL to 2.1.25 from 2.1.24:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS2MDL#19 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_LTR390 to 1.1.19 from 1.1.18:
  > Merge pull request adafruit/Adafruit_CircuitPython_LTR390#18 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPL115A2 to 1.1.20 from 1.1.19:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPL115A2#16 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPL3115A2 to 3.0.7 from 3.0.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPL3115A2#33 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPU6050 to 1.3.2 from 1.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPU6050#41 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_MSA301 to 1.3.8 from 1.3.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_MSA301#22 from jposada202020/adding_displayio_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_TM to 1.1.15 from 1.1.14:
  > Merge pull request adafruit/Adafruit_CircuitPython_TM#18 from jposada202020/adding_displayio_example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

M0 long int support
2 participants