I'm testing out this 9DOF sensor package (https://www.sparkfun.com/products/12636) and having some issues. The accelerometer isn't changing, nor does the Pitch & Roll reading. I'm running the LSM9DS0_Simple example that comes with the SFE library and this is what I'm getting:

Notice how the accelerator reading remains at -1.50, -1.50, 1.50 and the Pitch and Roll stays at -21.82, -21.82 regardless of how much I shake, spin, swing, or drop the thing. The Gyro, Mag, and Heading readings change, but nothing else does.

In the setup(), there's an example to initialize the library with sensor scales and data rates. When I enable that (and disable the default one), this is the result:

I wrote the library and hookup guide. I've tested the library using a handful of breakout boards and Arduinos, and I haven't encountered any problems as you've described. So, at first glance, I'm not really sure what the problem might be. Can you try uploading something really simple to only test the accelerometer? Here's an example:

I have some thoughts on what might be happening, but I'm not sure how it would. I wonder if the accelerometer outputs are being disabled in some way. Bits 2:0 in the CTRL_REG1_XM (20h) register need to be set to 1 to enable all three accelerometer axes. The "initAccel()" function should take care of that. "setAccelODR" is the only other function that messes with CTRL_REG1_XM, maybe that's working incorrectly?

Let me know if that simplified sketch outputs correctly or not. Then we can go from there.

I give up, no matter what I did tonight, from changing all jumper wires, different breadboard, different controllers (Uno, Leonardo, Mega, Mini), none of them produced anything. First I tried the short code posted above and got nothing. Tried going back to the original code I had, nothing. Figured I did something wrong so I removed all wires and started from scratch. No matter what I did, I got nothing. And somewhere in there, my Leonardo also stopped responding. I can no longer upload anything to it. When I hit upload (and the compile finishes), it resets then simply returns back to what it had on it. I reloaded the bootloader in case that got corrupted. Nothing. 'L' LED just blinks at me now (and continues to blink when I attempt to upload, eventually the IDE fails.)

So yeah, I give up. I have other projects I need to work on, projects that are actually working, unlike this IMU. This is the second DOA product from SFE in less than 12 months. And somehow it also affected my Leonardo now unless I can figure out how the heck to revive it so it works properly again.

Greetings,
I have a nearly identical issue. I'm getting these frozen accel raw numbers -24539 , -24539 , 24539 regardless of position. I tried the 2 example sketches for this LSM9DS0 and no luck. Then I tried the above simple sketch and still no luck. I am wondering if the hardware is faulty. Any insight that you can offer will be helpful.

czechm8 wrote:Greetings,
I have a nearly identical issue. I'm getting these frozen accel raw numbers -24539 , -24539 , 24539 regardless of position. I tried the 2 example sketches for this LSM9DS0 and no luck. Then I tried the above simple sketch and still no luck. I am wondering if the hardware is faulty. Any insight that you can offer will be helpful.

Peter

You're the third person that I know saying this unit isn't working for them. After my post above, I managed to revive my Leonardo but I did not get a chance to go back to the sensor board. In fact, I doubt I will ever go back to it seeing as I'm not the only person with the identical problem. I'm going to look into something else, even if it's a different vendor altogether.

I started scratching in the underlying libraries by adding some more debugging code etc, but it has not revealed anything useful.
Is there any other way to debug what is going on, or to know if the board is DOA?

FYI folks, I've ditched using one of the level shifting boards that SFE offers, and got a TXS0104 instead. The unit came up and worked flawlessly right of the bat. There is something to be said for using the proper hardware. That's not to say that using SFE's level shifter is wrong, it probably works just fine. I've just not been able to make it work with that. And since the TXS0104 is specifically designed for open-drain/push-pull applications, I choose that instead.

You can get free samples from TI if you just want to play with one.

Now, if I can only figure out how to get the single and double click feature working, I'd be set!