pimoroni / automation-hat

Python library and examples for the Pimoroni Automation HAT, pHAT and HAT Mini
https://shop.pimoroni.com/products/automation-hat
MIT License
122 stars 41 forks source link

Add support for ADS1115 #42

Closed Gadgetoid closed 3 years ago

Gadgetoid commented 3 years ago

Add transparent support for ADS1115 by measuring the conversion time.

The ADS1115 is a slower, 16-bit version of the 12-bit ADS1015.

Since ADS1115 is roughly 16x slower than ADS1105 with the same settings, we can detect which chip our measurements are coming from an compensate accordingly.

Thanks to Niko for this - somewhat jokey - stroke of genius.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1197670966


Files with Coverage Reduction New Missed Lines %
automationhat/ads1015.py 13 81.58%
<!-- Total: 13 -->
Totals Coverage Status
Change from base Build 363478316: -0.6%
Covered Lines: 292
Relevant Lines: 433

💛 - Coveralls