LSM6DSO sensor + Arduino not working

Hello!

First, I would like to state my issue:

  1. My software cannot connect to the LSM6DSO IMU sensor.

A little background on my project is that I am trying to use the IMU sensor to provide accelerometer readings in x, y, and z directions. I purchased a breakout board from Sparkfun that uses the LSM6DSO to test the sensor first with my Arduino-compatible controller via SPI communication. This proved that it works.

We then created our own design and referenced the way Sparkfun wired the LSM6DSO. Now when I run the program on the new board, the sensor doesn’t work.

I looked into the library that Sparkfun uses for programming in Arduino and I see that it cannot connect to the IMU sensor. In the library I can see where it fails, and it fails when checking the part ID. At first, I kept getting a part ID of 255 which is 0xFF. I should be getting a part ID of 108 or 0x6C.

I also had a Bluetooth module that snapped into our PCB and thought it was a good idea to snap it off and only debug the IMU sensor. After I snapped it off, I am now getting a part ID of 0. The MISO line before didn’t have a signal, now it does but the software is still getting wrong part ID. Therefore, I still get nothing for the accelerometer reading of the sensor.

Below is a snippet of the software from the Sparkfun library that reads the chips part ID and how my schematic of the sensor is.

uint8_t partID;
readRegister(&partID, WHO_AM_I_REG);
if( partID != 0x6C ){
    Serial.println(partID);
    return IMU_HW_ERROR;
}
else{
    Serial.println(partID);
    return IMU_SUCCESS;
}

SDO should be MOSI instead of MISO

Solved. There is a file called pins_arduino.h where communication protocols are configured. The wrong pin was assigned to MISO.