Compilation Errors in ADS1219 Arduino Library/SparkFun Toolkit

Hello All,

I have an ADS1219 24-bit, 4-chanel ADC. I installed Sparkfun’s ADS1219 Arduino Library, and Sparkfun’s ToolKit. I loaded one of their published examples, and it won’t compile. I get the following errors:

In file included from C:\Users\rjtri\AppData\Local\Temp.arduinoIDE-unsaved202663-19792-24k593.fobraj\Example03_InputMultiplexer\Example03_InputMultiplexer.ino:28:0:
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:226:30: error: ‘sfeTkArdI2C’ has not been declared
void setCommunicationBus(sfeTkArdI2C *theBus);
^~~~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:229:5: error: ‘sfeTkArdI2C’ does not name a type; did you mean ‘sfTkArdI2C’?
sfeTkArdI2C *_theBus; // Pointer to bus device.
^~~~~~~~~~~
sfTkArdI2C
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:286:5: error: ‘sfeTkArdI2C’ does not name a type; did you mean ‘sfTkArdI2C’?
sfeTkArdI2C _theI2CBus;
^~~~~~~~~~~
sfTkArdI2C
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h: In member function ‘bool SfeADS1219ArdI2C::begin()’:
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:247:13: error: ‘_theI2CBus’ was not declared in this scope
if (_theI2CBus.init(kDefaultADS1219Addr) != kSTkErrOk)
^~~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:247:53: error: ‘kSTkErrOk’ was not declared in this scope
if (_theI2CBus.init(kDefaultADS1219Addr) != kSTkErrOk)
^~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:247:53: note: suggested alternative: ‘ksfTkErrOk’
if (_theI2CBus.init(kDefaultADS1219Addr) != kSTkErrOk)
^~~~~~~~~
ksfTkErrOk
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:250:30: error: ‘_theI2CBus’ was not declared in this scope
setCommunicationBus(&_theI2CBus);
^~~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h: In member function ‘bool SfeADS1219ArdI2C::begin(const uint8_t&)’:
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:261:13: error: ‘_theI2CBus’ was not declared in this scope
if (_theI2CBus.init(address) != kSTkErrOk)
^~~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:261:41: error: ‘kSTkErrOk’ was not declared in this scope
if (_theI2CBus.init(address) != kSTkErrOk)
^~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:261:41: note: suggested alternative: ‘ksfTkErrOk’
if (_theI2CBus.init(address) != kSTkErrOk)
^~~~~~~~~
ksfTkErrOk
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:264:30: error: ‘_theI2CBus’ was not declared in this scope
setCommunicationBus(&_theI2CBus);
^~~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h: In member function ‘bool SfeADS1219ArdI2C::begin(TwoWire&, const uint8_t&)’:
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:275:13: error: ‘_theI2CBus’ was not declared in this scope
if (_theI2CBus.init(wirePort, address) != kSTkErrOk)
^~~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:275:51: error: ‘kSTkErrOk’ was not declared in this scope
if (_theI2CBus.init(wirePort, address) != kSTkErrOk)
^~~~~~~~~
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:275:51: note: suggested alternative: ‘ksfTkErrOk’
if (_theI2CBus.init(wirePort, address) != kSTkErrOk)
^~~~~~~~~
ksfTkErrOk
C:\Users\rjtri\OneDrive\Documents\Arduino\libraries\SparkFun_ADS1219_Arduino_Library\src/SparkFun_ADS1219.h:278:30: error: ‘_theI2CBus’ was not declared in this scope
setCommunicationBus(&_theI2CBus);
^~~~~~~~~~
exit status 1

Compilation error: exit status 1

Can someone help me to know what I am doing wrong?

Thank you

Hi @RJTristani1 ,

The SparkFun ADS1219 library depends on an older version of the SparkFun Toolkit. It needs Toolkit version 0.9.2 or less. Details. If you install Toolkit 0.9.2, all should be well.

TL;DR: The ADS1219 needs an upgrade to make it compatible with the latest version of Toolkit. That upgrade has been started - in the develop branch - but was not completed. I can’t remember exactly why there was a delay completing and publishing that upgrade, but I think it was to do with compatibility with one of our older products. We should revisit this and finish upgrading the library.

I hope this helps,
Paul

It worked perfectly! Thank you so much!

Could I ask you two things? 1) Please encourage the developers to finish the upgrade, and 2) “If you remember”, please post on this thread when it is complete? That way users will know it is safe to upgrade.

Thank you again,

Rob

The Library is now upgraded to use the latest version of the SparkFun Toolkit.

I also added doxygen generated documentation - which is on github pages and spiffed up the README file on the libraries repo.

Not sure when the Arduino library bot will pick up the changes, but it should be within the day. The new library version is 1.0.4

-Kirk