22[ ![ Arduino CI] ( https://github.com/RobTillaart/ADS1X15/workflows/Arduino%20CI/badge.svg )] ( https://github.com/marketplace/actions/arduino_ci )
33[ ![ Arduino-lint] ( https://github.com/RobTillaart/ADS1X15/actions/workflows/arduino-lint.yml/badge.svg )] ( https://github.com/RobTillaart/ADS1X15/actions/workflows/arduino-lint.yml )
44[ ![ JSON check] ( https://github.com/RobTillaart/ADS1X15/actions/workflows/jsoncheck.yml/badge.svg )] ( https://github.com/RobTillaart/ADS1X15/actions/workflows/jsoncheck.yml )
5+ [ ![ GitHub issues] ( https://img.shields.io/github/issues/RobTillaart/ADS1X15.svg )] ( https://github.com/RobTillaart/ADS1X15/issues )
6+
57[ ![ License: MIT] ( https://img.shields.io/badge/license-MIT-green.svg )] ( https://github.com/RobTillaart/ADS1X15/blob/master/LICENSE )
68[ ![ GitHub release] ( https://img.shields.io/github/release/RobTillaart/ADS1X15.svg?maxAge=3600 )] ( https://github.com/RobTillaart/ADS1X15/releases )
9+ [ ![ PlatformIO Registry] ( https://badges.registry.platformio.org/packages/robtillaart/library/ADS1X15.svg )] ( https://registry.platformio.org/libraries/robtillaart/ADS1X15 )
710
811
912# ADS1X15
@@ -29,9 +32,18 @@ although not all sensors support all functionality.
2932| ADS1115 | 4 | 16 | 860 | Y | Y | Tested |
3033
3134
32- As the 1015 and the 1115 are both 4 channels these are the most
35+ As the ADS1015 and the ADS1115 are both 4 channels these are the most
3336interesting from functionality point of view as these can also do
34- differential measurement.
37+ differential measurements.
38+
39+
40+ #### Related
41+
42+ - https://github.com/RobTillaart/MCP_ADC (10 & 12 bit ADC, SPI, fast)
43+ - https://github.com/RobTillaart/PCF8591 (8 bit ADC + 1 bit DAC)
44+
45+
46+ ## I2C Address
3547
3648The address of the ADS1113/4/5 is determined by to which pin the ** ADDR**
3749is connected to:
@@ -52,7 +64,7 @@ is connected to:
5264
5365#### Initializing
5466
55- To initialize the library you must call constructor as described below.
67+ To initialize the library you must call a constructor as described below.
5668
5769- ** ADS1x15()** base constructor, should not be used.
5870- ** ADS1013(uint8_t address, TwoWire \* wire = &Wire)** Constructor with device address,
@@ -105,7 +117,7 @@ better the Arduino Wire lib should support this call (ESP32 does).
105117
106118See - https://github.com/arduino/Arduino/issues/11457
107119
108- Question: should this functionality be in this library?
120+ Question: Should this functionality be in this library?
109121
110122
111123#### Programmable Gain
@@ -287,6 +299,27 @@ Instead you can configure the threshold registers to allow the **ALERT/RDY**
287299pin to trigger an interrupt signal when conversion data ready.
288300
289301
302+ #### Switching mode or channel during continuous mode
303+
304+ When switching the operating mode or the ADC channel in continuous mode, be aware that
305+ the device will always finish the running conversion.
306+ This implies that after switching the mode or channel the first sample you get is probably
307+ the last sample with the previous settings, e.g. channel.
308+ This might be a problem for your project as this value can be in an "unexpected" range (outlier).
309+
310+ The robust way to change mode or channel therefore seems to be:
311+
312+ 1 . stop continuous mode,
313+ 1 . wait for running conversion to be ready,
314+ 1 . reject the last conversion or process it "under old settings",
315+ 1 . change the settings,
316+ 1 . restart (continuous mode) with the new settings.
317+
318+ This explicit stop takes extra time, however it should prevent "incorrect" readings.
319+
320+ (need to be verified with different models)
321+
322+
290323#### Threshold registers
291324
292325If the thresholdHigh is set to 0x0100 and the thresholdLow to 0x0000
@@ -381,7 +414,7 @@ mean something different see - Comparator Mode above or datasheet.
381414
382415- ** bool begin(int sda, int scl)** begin communication with the ADC.
383416It has the parameter for selecting on which pins the communication should happen.
384- wireUsed is optional. Check RP2040 Pinout for compatible pins.
417+ Check RP2040 Pinout for compatible pins.
385418If, "Wire1" is used, you need to add "&Wire1" in the constructor.
386419
387420
@@ -390,7 +423,6 @@ If, "Wire1" is used, you need to add "&Wire1" in the constructor.
390423#### Must
391424
392425- Improve documentation (always)
393- - move code from .h to .cpp (0.4.0)
394426
395427
396428#### Should
@@ -400,9 +432,20 @@ If, "Wire1" is used, you need to add "&Wire1" in the constructor.
400432
401433- More examples ?
402434- SMB alert command (00011001) on I2C bus?
403- - constructor for ADS1X15 ?
435+ - sync order .h / .cpp
436+
404437
405438#### Wont (unless requested)
406439
407440- type flag?
441+ - constructor for ADS1X15?
442+
443+
444+ ## Support
445+
446+ If you appreciate my libraries, you can support the development and maintenance.
447+ Improve the quality of the libraries by providing issues and Pull Requests, or
448+ donate through PayPal or GitHub sponsors.
449+
450+ Thank you,
408451
0 commit comments