Has anyone got the sparkfun IMU shield working with the sparfun library:
The library seems to be a couple of years old and refers to application.h rather than Particle.h.
The board (IMU and photon are both pre-soldered units). But when I use the sparkfun example code I just get “Failed to communicate with LSM9DS1.” sent to the serial comms.
I ran a scan of all I2C devices using some example code on this forum and that successfully identifies the two I2C devices on the IMU board, 0x1E and 0x6B.
Yes, totally out of the box for both the IMU and photon. No jumpers have been altered. I’ll try pulling down the library and example and running that directly, rather thanuse the GitHub version. The library I pulled was directly from GitHub. Do you know where this library (the one hosted on particle.io) has come from and when it was last changed?
Oh yes, I see it now. Actually that GitHub repo has more recent changes to the .cpp file than the one linked to on the SparkFun product website, so hopefully will be more successful.
Yeah, the code looks the same. However, when i use that library by referencing the hosted library, rather than bringing in code directly from github, it works. Possibly a failure to copy and paste, I’m not sure, either way it works now.
@ScruffR, I have the same problem. I have a photon with well soldered headers, and brand new Sparkfun IMU shield out of the box. I ran an i2c scanner, which failed. When I push Basic_i2c.cpp, it in fact bricks my photon. I gotta flash the tinker again. Any inputs here? Thanks
If you actually have the same problem I’d expect the outcome to be the same as for slicc
Can you provide an image of your setup?
It is possible that the shield has an issue. I once had one that was DOA for SPI but worked with I2C. Maybe yours is the other way round.
If you can try activating SPI and use that.
BTW, bricking would actually mean dead for good. If you can revive it by any means it’s not bricked
For me, both I2C and SPI give me “Failed to communicate” error. When I flash the I2C, the photon goes into this weird state (I’m not sure what it’s called), in which flashing a new program from cloud doesn’t change the program internally. For example, I flash try flashing Blink LED program, and I get back the “Failed to communicate” error on the serial monitor. The only work around I found for this was to do “particle --usb tinker”.
Can you post a higher resolution image of the bottom side of the shield. On the pic you posted there the solder jumpers look somehow oddly setup.
This is the default setup for I2C as it should come out the box
Sorry, my browser previously had done a bad job loading the image. I now see your image in hi-res. So scrap what I said.
However, in order to test SPI, you’d need to alter the jumper setup by cutting traces and soldering others.
If you can, measure the resistance between the middle pads of the SCL/SDA solder jumpers and D0/D1 and the resistance between D0/D1 and 3v3.
The former should be near zero and the later near 10k.
With the Photon plugged in and set in Safe Mode test the voltage at D0/D1. This should be at 3.3V.
Also are you using the online library provided via Web IDE or any other source?
What system version are you targeting?
I have several of these shields and all but one (as mentioned above) worked out the box without any software or hardware tweaks needed.
So it sounds like DOA. I’d get in contact with your dealer to get a replacement.
For that reason I usually order at least two of each kind (if not too expensive) to have a reference as two DOAs aren’t that likely.
Sure, I can try and return this. So ideally, I just fit in the shield, flash the basic I2C example from GitHub and I’m good to go right? Just wanna make sure I’m not missing something before I order/return.