Hi!
I’m using the Arduino Mega 2560, and the LSM6DS33 IMU.
I’ve tried to run the LSM6 example code, but got the " Failed to detect and initialize IMU!" Error.
My connection set-up is:
VIN - 3.3V
GND - GND
SDA - SDA
SCL - SCL
And I’ve tried using the SA0 connection to force it to a specific SAD:
SA0 - 3.3V
or
SA0- GND
or without the SA0 connection at all.
I’m adding some photos in a zip file to better explain my situation
Your wiring looks okay to me, but could you post a picture of the bottom of your LSM6DS33 board so we can check your solder connections?
Since the Arduino Mega 2560 uses a 5V logic voltage, it would be better to connect the sensor board’s VIN to 5V instead of 3.3V so that the level shifter circuit will shift SDA and SCL to 5V. (However, I don’t think using 3.3V instead would hurt anything and it shouldn’t be causing the problem you are seeing now. Also, keep in mind that you should still use 3.3V for any of the non-level-shifted pins like SA0.)
Our library is written to detect the LSM6 with SA0 either high or low by default, so you should not need to do anything with the SA0/SDO pin like ejk said. However, if you use a different library that does expect a particular SA0, you might need to set it accordingly.