Using 2 MPU9255 on UNO

Hi there;

I've 2 MPU9255 items. here is the device:

I'm happy with single device , i do everything i need.
But now i need to apply the next device at the same time.

I use a4 and a5 pins for that but instead of that if i use the sda and scl pins on ardunio it works too.
i was planning to use a4-a5 pins for device 1 and sda-scl pins for the second one, but it didn't work:(

i read some comments to using ad0 pin to addressing as a slave my second device , but there is not ad0 pin on my item.

What should i do?
Best Regards

I use a4 and a5 pins for that but instead of that if i use the sda and scl pins on ardunio it works too.

that's because A4 and A5 are SDA and SCL.
You may need to do some surgery on one of your IMU modules to enable the alternate address

Yes i know that , i mean if i use a4-a5 pins for the first sensor and sda-scl pins for the second sensor how shuld i write that?

i imagine something like this;

#include "Wire.h"
#include "I2Cdev.h"
#include "MPU6050.h"

MPU6050 mpu1 (read from a4-a5 pins);
MPU6050 mpu2 (read from sca - scl pins);

Electrically, they're the same pins - if you want two devices on the same bus, you must either power down one, or give it a different address.

oww i understood that:/

i guess i need to give it a different address but how can i do it? is thre an example code for that?

Sorry for this rookie questions.

Best Regards

There is no code, address is a property of the hardware

That's right. It is something like 1 pin maybe. It is an input pin. If it is a high voltage high voltage applied to it.... then the device works with a particular address. If low voltage.... then uses 1 other address. A different one.

Yes i guess it will be something like that:)
i read some articles on web they talks about ad0 pin to make it slave but i dont have that pin on my sensor.
i only have INT and FSYNC empty pins.

There are some info about master-slave operations on this pdf:

But i m not experienced to understand that.

i'm working on animation industry , and trying to communicate with animation softwares. I'm planing to control virtual puppets with arduino. thats why im trying to connect 2 gyros at the same time.

I'm posting from my phone, so I can't easily read the datasheet.
Do you have a schematic for the board carrying the device?
Does it have any jumper/zero-ohm link options?

im connecting them directly, there is nothing extra. Here is my shematic:


as i said , i dont have enough experience to understand datasheet but i think there must be a jumper setup or something like that to make one sensor slave.

Show us a pic of your mpu-9255.

There is meant to be a pin... like AD0 .... for choosing 1 or two I2C addresses.


click here

here is the pic.
there is not a ad0 on it ....

here is the pic.

Where is the schematic?

here is the pic.
there is not a ad0 on it ....

Pasteboard - Uploaded Image

Ok.... thanks. Make sure to post the schematic for awol to look at.

Also, there are MPU-9255 break-out boards that do have the AD0. So either go into the schematic to try tap into at pin on your board. Or, alternatively, purchase (from ebay etc) a break-out board that has the AD0 pin.

Where is the schematic?

Here it is sir: Pasteboard - Uploaded Image

  • sorry for late reply i was out for a while.

Hi, I am using the same sensor, but cannot get the correct output from it, can you please post the code to get right values from this IMU,

MPU9250BasicAHRS.ino (18.8 KB)