i2c address conflict with TSL2561 and BMP085 on Mega

by iBucky on Wed Jan 02, 2013 11:22 pm

I want to use the TSL2561 and the BMP085 on the same Mega board, but they both are I2C and tied to pins 20 & 21 on the Mega (4 & 5 on the Uno). How can I use the two sensors on the same board?

The code mentions the following but I'm not sure how to do with with the two sensors. Or if this answers my conflict.
// The address will be different depending on whether you let
// the ADDR pin float (addr 0x39), or tie it to ground or vcc. In those cases
// use TSL2561_ADDR_LOW (0x29) or TSL2561_ADDR_HIGH (0x49) respectively
TSL2561 tsl(TSL2561_ADDR_FLOAT);


Thank you!
iBucky
 
Posts: 76
Joined: Wed Jan 11, 2012 9:40 pm

Re: i2c address conflict with TSL2561 and BMP085 on Mega

by adafruit on Thu Jan 03, 2013 11:27 am

they have different addresses, they will not conflict
User avatar
adafruit
 
Posts: 11511
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: i2c address conflict with TSL2561 and BMP085 on Mega

by iBucky on Thu Jan 03, 2013 2:40 pm

Thank you for the reply - guess I should have just tried it but I wasn't sure if I'd damage a sensor.

Sorry to be dense - but I should just connect both sensors to the same pins and they will work because they are addressed via different addresses?
iBucky
 
Posts: 76
Joined: Wed Jan 11, 2012 9:40 pm

Re: i2c address conflict with TSL2561 and BMP085 on Mega

by adafruit_support_bill on Thu Jan 03, 2013 4:36 pm

Yes that is right. And no need to worry about damaging a sensor due to duplicate addresses. They will both try to respond, but there will be no lasting damage.
User avatar
adafruit_support_bill
 
Posts: 25601
Joined: Sat Feb 07, 2009 9:11 am