Photon and IMU shield problem

Hi!

I just got my first Photon along with a Sparkfun IMU shield for the Photon. I hooked them up and uploaded a sketch via the web programmer. I included the SPARKFUNLSM9DS1 library and used the LSM9DS1_BASIC_I2C.CPP example.

The problem is that I keep getting conflicting output. For example, if I point the USB end towards the North, it stays between between 178 and -178. While I can work with the fact that there may be some interference in the room (nothing much, laptop, some speakers in the other side of the room, some other components on my desk), and the North reading may the thrown off, there is something that completely baffles me:

If I just lift the particle’s front side (USB connector part, keeping back on table) the heading reading jumps to almost 340 when it’s sitting with its USB connector straight up.

I worked with a Sparkfun Razor before (and a Bluetooth transmitter) and after the calibration (which I couldn’t find for the Photon IMU shield), it kept showing correct values.

I may be missing something. The only thing I’m interested in from the shield is the degrees offset so I can spin something in the same direction and speed, but the values I keep getting are all over the place for the same position (this happens if I spin it around a couple of times and bring it back to starting position; if I just keep it still it’s ok).

Thanks!

1 Like

I’m having a similar problem as well. The readings are very inconsistent. Be aware that tilting the IMU in any direction can have a large effect on the reading accuracy. In my case I have made sure it’s level and still have the same issue. I actually bought a second unit and have the same problem with both.