Pololu Alt IMU-10 V4 compass

Hi guys,

I hope someone can help with this. I’m trying to calibrate my compass using the library on Github ( GitHub - pololu/lsm303-arduino: Arduino library for Pololu LSM303 boards). I’ve connected my uno as follows:

  • 5v → VIN
  • GND → GND
  • A4 → SDA
  • A5 → SCL

The problem I’m having is when calling compass.read(). The rest of the code in the loop doesn’t execute after this call. Can anyone suggest what I can do to resolve this?

Thanks.

Calibrate.ino (855 Bytes)

JMan77:
The problem I'm having is when calling compass.read(). The rest of the code in the loop doesn't execute after this call.

I suspect it can't talk to the compass, you'll have to check your wiring.

What Arduino are you using ?

Are you connecting to the pins used for SCL and SDA on the Arduino you have ?

Yours,
TonyWilk