Author Topic: Another Library issue - ADS1114  (Read 2120 times)

lsnyman

  • RFduino Sr. Member
  • ****
  • Posts: 145
  • Karma: +1/-0
    • View Profile
Another Library issue - ADS1114
« on: July 10, 2014, 09:45:07 PM »
Mkay.
You guys have been great in the past about checking library compatibility and have helped tremendously.
I was wondering if you can check one more for me?
I have 2 different I2C devices running successfully. When I added an ADS1114 ADC to the mix, the Si7021 sensor starts producing incorrect readings randomly. It functions as usual but there is randomly some kind of offset introduced, which dissappears when power is cycled but will re-appear if the humidity level (Si7021) changes.
If I remove the ADS1114 device from the sketch, then the other devices operate as expected.
Could you have a look at the library which is again an adafruit library and see if anything is not suitable for RFduino? (Attached)
This is a popular ADC and worked ok on Arduino.
I am only using it in the Single-ended, single shot mode.
So my only commnds to this library are

Code: [Select]
#include <Adafruit_ADS1015.h>
Adafruit_ADS1115 ads1115(0x48);
adc0 = ads1115.readADC_SingleEnded(0);

As you can see in the picture, the Devices at the top do not contain the code for the AD1114 and the devices at the bottom contain the ADS1114 Code, one could be correct but the other 2 read incorrectly. I have swapped the code back and forth to confirm the issue moves with the code.
http://www.ti.com/lit/ds/symlink/ads1115.pdf

mkay

  • RFduino Team
  • *****
  • Posts: 405
  • Karma: +15/-0
    • View Profile
Re: Another Library issue - ADS1114
« Reply #1 on: July 14, 2014, 04:09:59 PM »
Hi lsnyman, can you try changing the #define ADS1115_CONVERSIONDELAY to (9) instead of (8) in the Adafruit_ADS1015.h file. I don't have the Si7021 sensor so I can't test it at the moment.

lsnyman

  • RFduino Sr. Member
  • ****
  • Posts: 145
  • Karma: +1/-0
    • View Profile
Re: Another Library issue - ADS1114
« Reply #2 on: July 14, 2014, 07:48:43 PM »
mkay
Thanks for taking a look.
It seems a little different. Let me do some more testing and I will let you know.

Thanks again