2

I'm trying to find the I2C address of an IMU plugged into my Arduino using the code from this URL: http://playground.arduino.cc/Main/I2cScanner. However, the program stalls at this stage:

enter image description here

Why could this be happening?

2
  • 2
    Pull-up resistors present? Commented Feb 18, 2017 at 23:20
  • 3
    In all likelihood it's a hardware problem. Without more details it is hard to say what that might be. You might mention what device you are using exactly, and exactly what wiring you are using, including pull-up resistors.
    – Nick Gammon
    Commented Feb 19, 2017 at 6:15

1 Answer 1

2

When the I2C scanner stops, it halts in the function Wire.endTransmission. The cause is a hardware problem of the I2C bus. For example the SDA or SCL are shortcut to something or pull-up resistors are missing (as already mentioned by TisteAndii) or the sensor module is not powered.

I assume that the IMU module has already pull-up resistors for SDA and SCL on the module. Which IMU module is it ? How did you connect it ? Do you have other I2C modules to test the I2C bus ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.