I'd like to connect two of these: Adafruit BMP280 I2C or SPI Barometric Pressure & Altitude Sensor [STEMMA QT] : ID 2651 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits
I've got a Mega 2560. They are good with 3v or 5v. Connecting one and reading the values is straight forward, but I'm lost when it comes to reading the values from two. I'm assuming I wire the two in parallel to the bus. Would it be best to use SPI instead of I2C? How do you read the data from each?
Thanks
You should be able to access both if you change the I2C address on one of them. See page 28 here:
It appears SDO is available to change on that board.
edit: Insure you heed the warning on page 11. It appears you should pull SDO HIGH with the VDDIO pin.
Warning. Holding any interface pin (SDI, SDO, SCK or CSB) at a logical high level when VDDIO is switched off can permanently damage the device due caused by excessive current flow through the ESD protection diodes.
It appears that the VDO pin is already brought high, to 3.3v through R4 which is a 10k resistor, section B3 of the above drawing. Am I misreading it?
If it is being pulled HIGH by a 10K resistor, that would result in the I2C address being compatible with the BMP180 (0x77). If you pull that line to GND, the address will be 0x76. Page 28 of the data sheet I posted above.
