adafruit / Adafruit-BMP085-Library

A powerful but easy to use BMP085/BMP180 Arduino library
http://www.adafruit.com/products/1603
233 stars 194 forks source link

Two sensors on I2C bus #24

Closed Sebenzouz closed 3 years ago

Sebenzouz commented 5 years ago

Hello, For a project, I would like to test the good functioning of a pressure sensor. To do that, I would like to comparate the value returned by the sensor tested with and other pressure sensor. However, I don't know if it is possible to do, because I have to connect the two sensors on the same I2C bus. Is it possible to adress differents requests to each sensors? These two are BMP180. Thanks a lot, Seb.

samyk commented 3 years ago

From section 4.2 of the BMP085 datasheet:

There is an easy way to connect two BMP085 to the same I2C bus: You can use the XCLR input of BMP085 to set one BMP085 part silent while you communicate with the other BMP085 part via I2C and vice versa. The signals can be provided by two digital outputs of the microcontroller, or one digital output and one inverter.