Hello!
I'm doing a small project in which I use the BME280 and the GY-521 on the Arduino nano.
I did the tests first on the Arduino UNO and everything went well, however, when I switched to the nano, I had a problem with the I2C communication, where it doesn't respond to the code.
I did the tests with a ScanI2C and found the IDs 0x68 and 0x76, for the GY-521 and for the BME280 respectively, but even though there appears to be a communication, it does not respond to the code. I also performed individually, but the same problem persists.
Check the voltage levels and be sure you have a pull up (~4.7K) to the 5 volt supply. You may have to use a level translator because the sensor(s) may be 3 volt. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
Your wires should be short and not in a cable.
Those sensors are 3.3V sensors. If you use a 3.3V Arduino board, then you have no trouble with the voltage levels of the I2C bus.
Perhaps you are using a better USB cable for the Arduino Nano and that makes it to run at a voltage which is 0.1V higher which could change everything
The Bosch BME sensors are sensitive for voltage levels that are too high. The Arduino board enables the internal pullup resistors when Wire.begin() is called, that might lift the voltage levels of SDA and SCL too much.
The GY-251 has a voltage regulator for VCC, but the SDA and SCL are directly connected to the sensor.
Sometimes there are pullup resistors on that board with the wrong value. Can you check that ? Or make a photo of it.
Which BME280 module do you use ? The Adafruit BME280 module has already I2C voltage shifters.
Do not add 4k7 resistors to 5V and then connect the BME280 to the bus without I2C level shifter.
When you use a level shifter, it probably has pullup resistors of 10k on the 5V side and 10k on the 3.3V side. That should be enough pullup.