Connect two BME280 Sensors on the I2C bus

Did you know that the BME280 sensor has two different I2C addresses? That means, you can read two BME280 sensors at the same time on the I2C bus. One sensor will use the default address (0x77) and the other sensor will use the alternative address (0x76).


First, let's connect the sensors like this:

  • VCC pin from both sensors to either 3.3V or 5V. If you are using an Arduino Uno, use the 5V pin.
  • GND pin from both sensors to the GND pin on your Arduino.
  • SCK pin from both sensors to the I2C clock SCL pin on your Arduino. On the Arduino Uno that would be the pin A5.
  • SDI pin from both sensors to the I2C data SDA pin on your Arduino. On the Arduino Uno that would be the pin A4.
  • Leave the CS pin from both sensors unconnected.
  • Leave the SDO pin from only one sensor unconnected.
  • Connect the SDO pin from the other sensor to GND.

When you leave the SDO pin from one sensor unconnected, you are telling this sensor to use the default I2C address (0x77).

But when you connect the SDO pin from the second sensor to GND, you are telling it to use the alternative I2C address (0x76).

Now we need the software. If you did not do this yet, download and install the BlueDot BME280 library through the Arduino IDE. This is important, because the BlueDot library does work with two BME280 sensors on the I2C bus.


Not every library for the BME280 available on the internet works with two sensors on the I2C bus. Just to be safe, download and install the BlueDot BME280 library.

Just go to Sketch -> Include Library -> Manage Libraries... and search for the BlueDot BME280 Library. Now click on it and install the library. You can also visit the GitHub repository to download the latest version of the library or just click on this button bellow.

After installing the library, run the example for multiple sensors on the I2C bus. Open up File -> Examples -> BlueDot_BME280_library -> BME280_MultipleSensorsI2C.

After uploading the code into your Arduino,  open up the Serial Monitor at 9600 baud speed to get the temperature, humidity, pressure and altitude from both sensors at the same time.

The functions for each sensor are slightly different. At the beginning of the program you declare two objects bme1 and bme2, one for each sensor. We need those to keep the calibration parameters for each sensor separated from each other.


    BlueDot_BME280 bme1;                                     //Object for Sensor 1
    BlueDot_BME280 bme2;                                     //Object for Sensor 2

Now, the functions starting with bme1 refers to the first sensor, while the functions starting with bme2 refers to the second sensor.