adafruit / Adafruit_ADS1X15

Driver for TI's ADS1015: 12-bit Differential or Single-Ended ADC with PGA and Comparator
Other
289 stars 301 forks source link

Adafruit_ADS1X15 Library #66

Closed cesartayoun closed 3 years ago

cesartayoun commented 3 years ago

i am using an ADS1115 16 bits with ESP32, i noticed that the ADS library does not have a function to check the availability of the sensor, hence if the sensor is not available the ESP32 will freeze. any workaround for such problem ? thanks

ladyada commented 3 years ago

@caternuson plz make https://github.com/adafruit/Adafruit_ADS1X15/blob/master/Adafruit_ADS1X15.cpp#L65 return the value from the i2cdev begin so it can be verified that the addr exists?

caternuson commented 3 years ago

@ladyada yah, should just do that regardless. i'll pr it real quick.

@cesartayoun can you share code that demonstrates the issue? wondering if the actual call to i2cdev.begin() is freezing?

caternuson commented 3 years ago

Possibly related to #64

caternuson commented 3 years ago

@cesartayoun Please update to the 2.2.0 release of the library: https://github.com/adafruit/Adafruit_ADS1X15/releases/tag/2.2.0 and see if that helps.

cesartayoun commented 3 years ago

Hello, i tried the singleended example, no particular code to share; i will update the library and try.. thanks

cesartayoun commented 3 years ago

Hi again, problem solved, i modified the library as instructed above. thank you