hello, I have question that I need to connect MPU6050 and ADS1115 to the arduino but both of them needs A4 and A5 i don’t know how to solve this problem … please help
this is the datasheet of the mpu
this is the datasheet of the ads1115
here is the connection of mpu with the arduino and the ads1115 with arduino separately
They’re I2C devices - they’re supposed to share a bus.
Connect them both. Make sure they're both the same voltage, either 5V or 3.3V. One (or both) should have pullup resistors from SCL and SDA to the relevant power rail. Don't forget to connect the grounds.
Grab an http://playground.arduino.cc/Main/I2cScanner scanner and scan for the adresses of the two devices. This will let you know you hooked them both up properly and they're not interfering with each other.
Find a sample script to make each one of them work and return some data.
Then start writing your actual program.
A4 and A5 pins are for i2c. in uno version, itself has 2 port of i2c. 1st port of course at A4 and A5, and the 2nd port at right 2 top pin. you may refer the image attached
Just to be clear, the top 2 left pins are the same SCL/SDA as the bottom 2 right pins, they are connected in parallel.
I2C works by connecting the SCL/SDA of all devices to those pins in parallel. All the slaves watch for their address and then respond accordingly.