I am having problems with getting I2C comms to start. Here's the story...
I am trying to get the Sparkfun LSM9DS1 IMU breakout board to work with an Arduino Due. I have hooked up the board's interface to the Arduino with ground and 3.3 volt power and SDA and SCL connected to pins 20 and 21 respectively. The Sparkfun board is unmodified.
The wires are currently around 20cm long.
I am running either Sparkfun's LSM9DS1_Basic_I2C program or my own (very cut down) version and I am monitoring the serial output on the serial monitor on the PC.
The problem is that for some reason the data will not always start (and I see the error which is generated by the if (!imu.begin()) statement).
However, I can get it to start reliably if I power up the board and then, after a few seconds, connect the SDA line. Once it has started it is completely reliable.
Has anyone got any ideas why this might be happening?