Sensor Stick / LSM9DS1 Settings

Hi all,

I was trying to use the Arduino IDE example code to change the 9DOF Sensor Stick settings, but noticed that my changes to the settings weren’t affecting behavior, and in fact querying the imu.settings values after running the imu.begin() function showed that the settings differed even from the defaults in the LSM9DS1_Settings example.

Looking at the library source, I’m guessing that the offending line is in SparkFunLSM9DS1.cpp, L155, which calls the init() function and overwrites any previous settings selections. Is there a way in the current codebase to get around this, or do I need to roll a custom version of the SparkFun library code? Thanks!

If it’s the library doing it, you will need to modify the library or find an alternate library that doesn’t mess with the settings for you. There may be another library available, check the IDE or internet search “LSN9DS1 Arduino” and it’s possible an alternate will pop up.