Connected the BMP180 and BME280 in arduino Nano, but just one is working

Hi guys, I’m trying to connect two sensors in an arduino nano, the BMP180 and the BME280. However, I’m receiving the data just from BM180. I’m sure that I had wiring them correctly.

The address from the BME280 in I2c is 0x76, the BMP180 is 0x77.
I’m using these libraries:

BMP180
BME280

#include <SFE_BMP180.h>
#include "Seeed_BME280.h"
#include <Wire.h>

#define ALTITUDE 1655.0 
BME280 bme280;
SFE_BMP180 pressure;

void setup()
{
 Serial.begin(9600);
  if(!bme280.init()){
    Serial.println("BME280 error!");  
  }
  if(!pressure.begin()){
    Serial.println("BMP180 error!");
  }
}

void loop() {
  double T,P,p0,a;
  char status;
  float pressao;

  Serial.print("BME280 Temp: ");
  Serial.print(bme280.getTemperature());
  Serial.println("C");
  
  Serial.print("BME280 Pressure: ");
  Serial.print(pressao = bme280.getPressure());
  Serial.println("Pa");
  
  Serial.print("BME280 Altitude: ");
  Serial.print(bme280.calcAltitude(pressao));
  Serial.println("m");
  
  Serial.print("BME280 Humidity: ");
  Serial.print(bme280.getHumidity());
  Serial.println("%");

  Serial.println();

  delay(1000);
 
  //      **** BMP180****        //
   status = pressure.startTemperature();
  if (status != 0)
  {
    delay(status);
    status = pressure.getTemperature(T);
    if (status != 0)
    {
      Serial.print("temperature: ");
      Serial.print(T,2);
      Serial.print(" deg C, ");
      
      status = pressure.startPressure(3);
      if (status != 0)
      {
        delay(status);
        
        status = pressure.getPressure(P,T);
        if (status != 0)
        {
          Serial.print("absolute pressure: ");
          Serial.print(P,2);
          Serial.print(" mb, ");
          Serial.print(P*0.0295333727,2);
          Serial.println(" inHg");

          p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)
          Serial.print("relative (sea-level) pressure: ");
          Serial.print(p0,2);
          Serial.print(" mb, ");
          Serial.print(p0*0.0295333727,2);
          Serial.println(" inHg");

          a = pressure.altitude(P,p0);
          Serial.print("computed altitude: ");
          Serial.print(a,0);
          Serial.print(" meters, ");
          Serial.print(a*3.28084,0);
          Serial.println(" feet");
        }
        else Serial.println("error retrieving pressure measurement\n");
      }
      else Serial.println("error starting pressure measurement\n");
    }
    else Serial.println("error retrieving temperature measurement\n");
  }
  else Serial.println("error starting temperature measurement\n");

  delay(1000); 
}

Thanks.

Did you run an I2C scanner sketch to be sure both sensors are responding on the correct addresses ?

srnet:
Did you run an I2C scanner sketch to be sure both sensors are responding on the correct addresses ?

When I runned the I2C scanner, I received that only the 0x77 was found

MuriloTibana:
When I runned the I2C scanner, I received that only the 0x77 was found

And when the 0x77 is disconnected ?

srnet:
And when the 0x77 is disconnected ?

No device is found.

So the device on 0x76 is either wired incorrectly or faulty.

Make sure the BME280 is in I2C mode, not SPI mode. This is done by a specific connection on startup (check the datasheet for details).