ADS1115 WE Versions Save

An Arduino library for the 16-bit, 4 channel ADS1115 ADC. Convenient to use. All features of the ADS1115 are implemented, including alert functions.

1.5.1

1 month ago

I added explanations to the blocking nature of the setCompareChannels() function and introduced the function setCompareChannels_nonblock().

Furthermore I changed the code for the delays when changing channels from

        delayAccToRate(rate);
        delayAccToRate(rate);

to

        for(int i=0; i<2; i++){ 
            delayAccToRate(rate);
        }    

because some people considered this to be copy/paste error.

1.5.0

4 months ago

The library now also works with the ADS1015.

1.4.6

7 months ago

For advanced users a non-blocking version of setCompareChannels() was added. Users that apply this function need to take care themselves that a measured value from the new channel is already available.

1.4.5

7 months ago

Auto range functions did not work with negative voltages. The main issue were cases in which the raw values were -32768 (-2^15).

1.4.4

7 months ago

result = map(rawResult, -32767, 32767, min, max);

changed to

result = map(rawResult, -32768, 32768, min, max);

since +/- range corresponds to +2^15/-2^15

1.4.3

1 year ago

Various changes:

  • Replaced #defines by constexpr
  • Further "cleaning" of constructors
  • Replaced C-cast by static_cast
  • Replaced private by protected

1.4.2

1 year ago

I eliminated some constructors. Users won't notice.

1.4.1

2 years ago

I have added the option to use TinyWireM from Adafruit instead of Wire.

1.4.0

2 years ago

For all settings in the conversion register the conversion register is read, the relevant bits are set to zero and then the relevant bits are set to the desired values. What I had overlooked is bit 15. When reading, a 1 means that no conversion is ongoing. When writing a 1 means in single shot mode that a conversion is triggered. Therefore all settings triggered a conversion in single shot mode.

Moreover I have simplified the Auto_Range.ino sketch. I was a bit more complicated than necessary.

1.3.9

2 years ago

In the readRegister function, I have added a "false" in Wire.endTransmission() ---> Wire.endTransmission(false) before Wire.requestFrom(). This saves about 80 µs.