Using multiple I2C devices ... on different sets of Arduino ports

I'm making a shield for the Mega 2560, but I've hit some PCB layout constraints due to the amount of stuff I tried to fit onto the board.

As a temporary stopgap measure until I redesign and remake the PCBs, I'd like to add a Lux sensor, the BH1750, onto ports 22 and 24 of the Arduino Mega 2560. Of course the Mega's "native" SCL and SDA ports are 20 and 21 (indeed I'm using these for an MPR121 proximity sensor) and eventually I will hook up the Lux sensor to those ports as well.

I've looked at the SoftI2C library but:

1/ I'm not sure whether it will coexist with Wire.h
2/ I'm not sure how to get it to work with this BH1750 library (or any other)

Any tips?

How about a I2C capable ADC? The PCF8591 for example. You can have a couple of analogue input and free up some inputs on the board.

Same counts as digital in-/outputs.

EDIT: But you do need to adjust the libraries and such, or write your own...

Thanks for the response. My hardware choices are limited, I need to run a second instance of I2C on Mega ports 22 and 24...

Any ideas how I can achieve the above?

normally an I2C can handle multiple device (up to 120 or so) .
Is that not an option?

robtillaart:
normally an I2C can handle multiple device (up to 120 or so) .
Is that not an option?

'fraid not, I can't physically access the existing device as it's buried under some others and don't want to bodge the soldering on a few test units I've already made.

So basically I need a stopgap solution using software

1/ I'm not sure whether it will coexist with Wire.h
2/ I'm not sure how to get it to work with this BH1750 library (or any other)

The lib is now Wire based so you need to "rewire" it with the soft12C lib. That means in practice replace all (10-15) references to Wire.xyz() with the appropriate equivalent of the softlib.

e.g. Wire.read() becomes i2c_read()

Not done this before but if you are lucky it will 30 minutes work.