Closed aufdenkampe closed 1 month ago
@SRGDamia1, here are some of the new capabilities of Adafruit's v2.4.2 that would be handy (and are now being used by others):
bool
return type for begin()
to allow checking initialization success.Here are the breaking changes introduced with v2.0.1:
Adafruit_ADS1015
to Adafruit_ADS1X15
. You will need to update #include
sbegin()
and not the c-tor. If you were using a non-default address, then you will need to make that change.Adafruit_BusIO
library, which is a new dependency.It's been a while. I know there was a reason I picked the fork, but I don't remember it now.
With commit e2a9410 I just updated the entire repo to compile using Adafruit's version, so I think it should all work.
The comments that I could find (in https://github.com/EnviroDIY/ModularSensors/issues/235#issuecomment-470208394) was that there was a bug in Adafruit's version, which they didn't address for years. But that was 2016ish, and they really picked up development again starting in 2020. It's been quite active since, so I'm going to presume that bug was fixed.
Some of the features added by soligen2010, such as continuous mode (a0b81d5c4e0da0367d293e8610c825e5aee7f9c7) seem to have been added by Adafruit.
After a bit of research and work, I'm now strongly leaning toward making the switch, but it might make sense if you or someone at Stroud could test my branch a couple of your analog sensors.
@SRGDamia1 & @s-hicks2, could you test that my AlphasenseCO2 branch works with other sensors that use the ADS1X15 ADC?
Thanks!
@SRGDamia1 & @s-hicks2, can either of you test that my AlphasenseCO2 branch works with other sensors that use the ADS1X15 ADC?
I really think this is an important and valuable update and that we should move forward with this Pull Request to the develop
branch.
@SRGDamia1, this issue can probably be closed given that you merged this PR:
Have you tried the modified ADS1X15 dependency for any other sensors?
Completed with Release v0.36.0!
This is a key library for TI's popular Analog to Digital Converter (ADC) used in the Mayfly and many other boards.
Back in 2019 (or earlier), @SRGDamia1 decided to use the
soligen2010
fork of Adafruit's library because it fixed some key bugs, and Adafruit hadn't developed it since 2017 or so and wasn't accepting a pull requests to fix it (see https://github.com/EnviroDIY/ModularSensors/issues/235#issuecomment-470208394):However, starting around 2020 Adafruit has renewed active development and issued a series of v2.x releases (with breaking changes).
Adafruit's v2.4.2 is now 61 commits ahead of soligen2010, and is being actively pushed to PlatformIO's Library Registry:
The major issue is that code developed for https://github.com/adafruit/Adafruit_ADS1X15 will often not work with ModularSensors because of the new and useful functions added to Adafruit's v2 version.
@SRGDamia1, what would it take to switch back? Did any of the 22 commits made to soligen2010 add new features that we depend on?