LSM9DS1 Arduino Library Update Breaks My Code

I understand that the LSM9DS1 is a discontinued product. But in the 2014-2016 time frame, I built some 14 specially designed wearable, wireless controllers using these units purchased from SparkFun.

My initial designs were coded in an Eclipse/ Arduino 1.0 setting using the (generously and freely supplied, as usual at SparkFun) Arduino Libraries issued by SparkFun for the LSM9DS1 and the ESP8266 Thing. The headings of all the components (.h/.c++) listed the version number as "IDE: Arduino 1.6.0, Hardware Platform: Arduino Uno, LSM9DS1 Breakout Version: 1.0). Needless to say, the code for my designs is somewhat lengthy and complex, but has worked flawlessly for the past 7 years.

Recently, however, I proceeded to update the software on my devices, again using an Eclipse C++ editor with the Arduino 2.0 IDE. When I first ran the IDE, a message was displayed indicating that there was an updated version of the SparkFun LSM9DS1 Library, which I downloaded and installed, assuming that it would work as before. In fact , the modules of the updated library indicated exact same version number (the headings were unedited).

But, to my surprise, the updated libraries were entirely different from the original 1.0 versions, performing initializations in a very different order that, even though it would build and download without issues in the Arduino 2.0 IDE, the new LSM9DS1 library caused my devices to fail miserably, in a manner that took me a good day’s effort to discover the cause of. Rather than adopting my code to the newer drivers, I chose to replace them with the original 1.0 versions, which I fortunately had in my archives. This enabled me to then proceed without further issues.

The lesson here is that, despite the fact that SparkFun has always been more than generous in providing free libraries and drivers for the devices it markets, that is no excuse for not ovbserving good programming practices. At the very least, the headings of the driver modules should have been updated to indicate a later driver version and date. And furthermore, there should have been some sort of notice posted on the SparkFun site (or even an email to LSM9DS1 purchasers) that installation and use of the updated libraries would most likely break any code written to the specs of the initial version (actually, it’s hard to imagine how the new version would not break code written to the earlier version).

OK, that’s my 2-cents (more line a quarter in 2023).

You can file an ‘issue’ for the library’s github with the suggestion

This might be what you’re looking for.

https://github.com/sparkfun/SparkFun_LS … ag/V_1.0.0

I’ve found the 2.0 IDE to be a bit buggy, you might try using 1.8.xx.