I’m using the Arduino NANO, and the LSM6DS33 IMU with the LSM6 example code.
My connection set-up is:
VIN - 3.3V
GND - GND
SDA - A4
SCL - A5
I want to connect another LSM6DS33 IMU to it.
Do any of you know what is the pinout for the second connection, and are there any changes to the code needed to be made, for it to run two IMU simultaneously?
BTW, this is my code for now:
Serial.println("Failed to detect and initialize IMU!");
snprintf(report, sizeof(report), "%6d %6d %6d %6d %6d %6d",
imu.a.x, imu.a.y, imu.a.z,
imu.g.x, imu.g.y, imu.g.z);
Thanks in advance!
To connect a second LSM6DS33 carrier you should connect it to the same 4 pins as your first carrier plus connect its SA0 pin to ground to change its slave address. More details about changing the address are available in the “I²C communication” section of the carrier’s product page.
Then, you will also need to create two instances of the LSM6 class and initialize both sensors in your code with both arguments of the init function specified. For example:
After that, you can access each sensor through the corresponding object.
OMG, Claire - You’re the queen!
For future users - I did as Claire said:
Connected one of the SD0 to ground, and by that set its address to 0x6A [The other sensor is at 0x6B].
The difference from Claires’ advice, was that I used the init function with different variables:
As in, device_auto and not device_DS33.
Anyhow, now it works (:
Thanks again Claire