Changing default sensor pin usage

Hi there,

I have some novice coding experience, and have done arduino projects in the past, however this time I am trying to use rather a lot of sensors on one arduino nano board. I've run into the problem that the default gpio pins that (as far as I am aware) are defined in the .h files clash. I'm wanting to use both an MPU6050 and a BMP180, both of which by default call for gpio pins A4 and A5.

My question is how do I override these defaults and get them communicating on other pins? I'm getting a little tangled up with what I've read on various web pages and want to ask before I do mauling the assembly script.

Thank you very much!

Are they using A4 and A5 because they are using I2C (the Wire library). If so then they can share. That's the point of I2C, you can connect multiple things on the same pins and they communicate using addresses.

If they are using I2C, then they won't work on any other pins.

Ah ok yeah. They are using I2C. Ok, so they are able to communicate without glitches on the same gpio pins? I've never connected multiple devices to the same pins before.

Thanks for your help. I'll let you know how I get on.

Much appreciated.