Releases: wollewald/ADS1115_WE
Preventing issues using isBusy() in continuous mode
Added a delay(0) in while-loops
To prevent trouble with ESP8266 boards I have changed:
while(adc.isBusy()){}
to
while(adc.isBusy()){ delay(0); }
Update of Readme
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.
Implemented full ADS1015 functionality
The library now also works with the ADS1015.
Non-blocking version of setComepareChannels was added
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.
Auto range functions did not work with negative voltages
Auto range functions did not work with negative voltages. The main issue were cases in which the raw values were -32768 (-2^15).
Smaller issue in function getResultWith Range()
result = map(rawResult, -32767, 32767, min, max);
changed to
result = map(rawResult, -32768, 32768, min, max);
since +/- range corresponds to +2^15/-2^15
Replaced #defines by constexpr
Various changes:
- Replaced #defines by constexpr
- Further "cleaning" of constructors
- Replaced C-cast by static_cast
- Replaced private by protected
Tidied the constructor
I eliminated some constructors. Users won't notice.
Ready to use on an ATtiny
I have added the option to use TinyWireM from Adafruit instead of Wire.