SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Caljens
#195293
Hi all,

Desperately seeking help from resident gurus on this one.

As per the title, I'm trying to get two LSM9DS1 (Sparkfun 9 DOF boards) communicating with an Arduino Mega 2560 uC via I2C. According to the hook-up guide (https://learn.sparkfun.com/tutorials/ls ... no-library), I can slice the two SDO jumpers on the rear of the second board (they are SDO_M and SDO_AG), which, according to the LSM9DS1_Basic_I2C example, would change my address:

Cut from the sketch (remembering I've set these low):
define LSM9DS1_M 0x1E // Would be 0x1C if SDO_M is LOW
define LSM9DS1_AG 0x6B // Would be 0x6A if SDO_AG is LOW

I have also cut the I2C Pull-up jumpers on the rear of the second board as I believe you need just one set anywhere on the I2C bus, which I have with the first board (no jumpers cut on that).

When I do this, and change the LSM9DS1_Basic_I2C address, I get a "Failed to communicate with LSM9DS1" response. I checked the chip with no jumpers cut, and also with just SDO_M and SDO_AG cut (i.e. leaving the I2C PUs in tact), still no joy.

CS_AG and CS_M remain pulled high as the jumpers are still intact on both boards, so this should set them into I2C mode.

Any ideas what I might be doing wrong?

Any help greatly appreciated!!

Cheers
By Caljens
#195297
Thought I'd post the solution to this problem in case someone else finds themselves in the same situation.

I used Multi_Speed_I2C_Scanner from http://forum.arduino.cc/index.php?topic=197360 to constantly scan my I2C bus while I tried to get the second LSM9DS1 working.

Turns out I needed to wire my SDO_AG and SDO_M terminals to GND - once I did this, the device(s, as there are actually two devices per LSM9DS1, that is one Mag and one Gryo/Accel) appeared and is working fine.

Can't recommend the Multi_Speed_I2C_Scanner more highly for this kind of thing.