BME280 Sensor not working

If you are using the Adafruit library take the address fount with I2C scanner and put it inside the begin

bme.begin();

For example if I2C found the sensor at 0x76 write

bme.begin(0x76);