Connecting two SCL and SDA on one arduino nano

Hello, I am wanting to connect two sensors onto one Arduino nano. I am relatively new to arduino. The sensors are a LIS3MDL Magnetometer and a SFE_BMP180 pressure sensor. Both require a SDA and SCL connection. I have the pressure sensor connected and fully functional, but when I try to plug in the magnetometer, neither work correctly. I am plugging them both into SDA to A4 and SCL to A5 on the nano. Can someone tell me what I am doing wrong, or is there another piece that I need to make them work together? Thanks!

Could you post an image of how you got the 2 thinges connected?

With both thnigies connected and you run the I2C scanner what address do they report? Words like "arduino i2c scanner" in a search thingy could give clues about the I2c scanner thingy.

What happens if you just use the magnetometer without the pressure sensor?

Do you know how I2C addresses work? Those chips have different I2C addresses so it will work on the same bus.

LIS3MDL Magnetometer Address 0x1C
SFE_BMP180 pressure sensor Address 0x77

So it looks like you have a wiring fault on the Magnetometer that is dragging the I2C lines down.

By the way you need a 4K7 pull up resistor on the SDA and SCL lines.

Sorry, I'm just incredibly stupid and forgot to plug in some stuff :sweat_smile: Thanks anyways though!

image
Thats what I used to tell my clients anyway, LOL.

1 Like

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