-
Notifications
You must be signed in to change notification settings - Fork 31
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
Detect that ADS1x15 is not present? #13
Comments
I don't think this is implemented. I guess this could be done if you can find a command to send the chip that has a predictable response. I have renewed hopes that Adafruit will merge this into their base, in which case you could make this addition to the original library. I don't think I would take a pull request right now in hopes that they are going to merge what I already have. However, you could add it to your own fork then send it in once we see where things land. |
Yes ... I looked through the code and hadn't spotted anything. There are a few easy ways this can be added:
The return value "error" will be 0 if there is a device at that address. Not necessarily an ADS1x15, but at least a device is present.
I'm early in my testing, but might fork if I decide to implement one or both of these "fixes". I did reach out to Adafruit to ask them about these libraries last week. That is when I found your fork. They explained about the overhead of maintaining libraries, and having to do regression testing, and testing across multiple boards. They asked if I'd like to "take care" of a repo. I'm thinking about what I want to ask for in return. :-) |
In in RF24 library (for the NRF24L01) they implemented a separate isChipConnected() method. Another option. This way worked well for me because I could detect if one or 2 chips were connected and adjust the behavior accordingly. I guess by default I am "taking care" of this library as this fork has so much more functionality than the original. Not everyone finds this fork, so I see the same changes being done by multiple people. If Adafruit continues to not do the merge after a while, I'll take what you come up with here. |
Any response from Adafruit? |
I think there is never going to be merged. |
Well they are not famous for maintaining their libraries... 😕 |
Hello,
Thank you for taking this library forward. I appreciate the work you have put into it ... Adafruit owes you for doing their work for them. :-)
I noticed that if the ADS1x15 is NOT present on the I2C bus, there is no indication that I can find that my code can use to know the values are all "bad". Often, in other libraries, the .begin() method will fail if the chip is not detected on the I2C bus.
Is there currently a way in the library to determine that an ADS1x15 chip is or is not present and responding?
Do you have ideas or suggestions on implementing such a test?
Thanks again!
The text was updated successfully, but these errors were encountered: