Connecting three i2c devices with different addresses to an Arduino mega

i am using a pulse oximeter (MAX30102), IR thermometer (MLX90614), and a 16x2 lcd screen with an i2c module. i am using a mega and have connected the MAX30102 to pins 20 and 21. the MLX90614 is connected to scl and sda pins above the pwm pins. how can i connect the 16X2 screen. i have found the address for the screen already. Any help is much appreciated

Hello, you can connect all devices on the same I2C bus.
The important thing is that each device connected to the I2C bus has a different address than the other devices on the same bus.
And that only one of the devices has the set of pullup resistors required by the I2C protocol.
To find out which address of each device connect one at a time to the arduino and run the sketch I2cScanner.
https://playground.arduino.cc/Main/I2cScanner/

RV mineirin

These are the same pins.
I2C is a bus system, all members share the same lines.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.