Using the standard BME280 library i ran into a strange issue when trying to use the BME280 from a Mega2560.
Using the stadard library on a Nano the hardware SPI works OK.
Because the BME280 library is using more memory than average i switched to a Mega2560. Just replaced pins 10, 11, 12, 13 to the corresponding 53, 51, 50, 52.
Tried 2 Mega2560 boards. Both just no response at all.
Then switched from hardware SPI to software SPI:
Using software SPI at pins 10,11,12,13 should work, assuming you have a "R3" version of the Mega board.
Perhaps something is not reliable yet. Can you show how the level shifters are wired ?
The level shifters for the I2C bus make the TTL signals weaker.
Can you start thinking about buying a 3.3V Arduino board ?
To compleet the interface from a 5v arduino to the 3.3v BME280.
I needed 3 level shifters to get it working:
The CLK signal did need an active one: 1 fet and 2 resistors.
For the CSB and MOSI a pasive of 2 resitors worked: 1k8 / 3k3 (18k / 33k did not work)
For the MISO no level shifters is needed.