Unable to read sensors on MinIMU-9 V2 with Arduino UNO R3


I’m attempting to read the sensors on the MinIMU-9 V2 with an Arduino UNO R3 using the sample code provided on the product page but have been unable to get anything.

Here’s a photo of my setup.

I’ve connected the wires as such: SCL > SCL, SDA > SDA, VIN > 5V, GND > GND.
I’ve had the connections tested, the board is receiving power and the VDD pin is outputting 3.3V. When I upload the sketch to the Arduino, the SDA pin receives something (measured using a scope I think it’s called).

I’m using the following code and when I open the serial monitor it just says “Failed to autodetect gyro type!” which makes me think it is simply not detecting the board but I don’t know if there’s a way to force it to detect it?

#include <Wire.h>
#include <L3G.h>

L3G gyro;

void setup() {

  if (!gyro.init())
    Serial.println("Failed to autodetect gyro type!");
    while (1);


void loop() {

  Serial.print("G ");
  Serial.print("X: ");
  Serial.print(" Y: ");
  Serial.print(" Z: ");


I don’t know a lot about electronics and I kind of understand the sketch language but I’m struggling here. My end goal is get the sensor data onto the PC and manipulate it using Matlab to create the required outputs and maybe use it as part of a flight control system (this is a university project). Please excuse my ignorance if this is something relatively simple but I’m pretty new to this. Thanks


I am sorry you are having problems using your MinIMU-9. From the picture, your connections look correct. I suspect the I2C interface is not working if it is failing to detect the gyro type. You mention you were able to see the signal change on the SDA line using an oscilloscope. Could you try measuring the SCL pin and see if there are any changes in the signal on that line? Could you post close-up pictures of both sides of the MinIMU-9 board?

- Jeremy

Hi Jeremy,

We measured the SCL pin as well and that also received something similar to the SDA pin.

Here are some close ups of the board, best I can do with my camera I’m afraid. I can get better ones with my friends SLR if these aren’t clear enough.

Thank you for the photos. It is a little difficult to see the soldering on the pins, but I do not see any obvious damage to the board. Have you verified that the Arduino’s I2C interface works? If not and you have another I2C device, could you try testing it? Alternatively, if you have another Arduino, could you try that with your MinIMU-9?

- Jeremy

I’ve been unable to find any other I2C devices or another Arduino board to use. What would you suggest I do now?

It is really difficult to continue troubleshooting without verifying that the I2C function on your Arduino works. If you have not yet, you might try the serial example from the LSM303 Arduino library to see if you can communicate with the LSM303DLHC on the MinIMU-9.

From your previous post, it sounded like you might be a student. If so, you might try asking your classmates to borrow an Arduino and/or an I2C device. You might also try visiting local hackerspaces to see if anyone can help you by lending those devices (they might also be able to help you troubleshoot your issue).

- Jeremy

Ok, so I’ve managed to get some help from someone with an Arduino and experience with I2C devices. We tested the minImu with his board with similar results so I don’t think the Arduino is the problem.
We then had a look at the code in the L3G library and he was finding it difficult to see any link between the datasheet for the L3GD20 (pololu.com/file/0J563/L3GD20.pdf) and the registry values in the library code. The library mentions a normal operating mode which we couldn’t find any reference to on the datasheet.
Assuming the sample code is perfectly functioning I think there is something wrong with the minImu board.

Our L3G Arduino library should work with our the MinIMU v2. You can find the register addresses mentioned in the datasheet in the L3G.h file in the L3G Arduino library. Were you able to try the serial example from the LSM303 Arduino library I mentioned in my previous post.

It does sound like your board might be damaged. If you contact us directly at support@pololu.com with your order information and reference this forum post, we can look into getting you a replacement.

- Jeremy

Yeah I forgot to mention I’d also tried the LSM303 code with no result.

I’ve contacted the supplier and they’ve asked for me to send the minImu to them so I should be getting this sorted soon.