I2C Device reset

I want to use different I2C pins for a BME280 temperature sensor as the default ones are already used.
Therefore I'm using the Wire library.

#include "Wire.h"
#include <Adafruit_BME280.h>

#define I2C_SDA 2
#define I2C_SCL 9

TwoWire I2CBME = TwoWire();
Adafruit_BME280 bme;

void setup() {
...
  bool status;

  status = bme.begin(0x76, &I2CBME); //This line causes the reset
  
  if (!status) {
  Serial.println("Could not find a valid BMP280 sensor, check wiring!");
  }else{
    Serial.println("Conncted to sensor");
  }
...
}

If I'm setting the I2C pins to 1 and 2 every works (except of the sensor :wink: ) any other pin causes a reset of the Controller and recall of the setup routine (in a loop)

Any idea? Which pins can be used for I2C (I'd prefer GPIO9 and 10)

NickAmSee:
Which pins can be used for I2C (I'd prefer GPIO9 and 10)

That almost certainly depends entirely on which Arduino you are using, do you know ?

That almost certainly depends entirely on which Arduino you are using, do you know ?

Sorry forgot...
it's a NodeMCU V3

Wire.begin(D5, D6); // am Robot-Auto

Is there list of usable pins? D5/D6 is also used

What is the reason for the reset?

I switched to SPI. Same issue. I think it's a bug in the BME library.