I'm using the Adafruit BME280 library from here:
But it's designed for the Adafruit BME280 breakout board, whereas I'm using a cheap chinese clone, that looks like this:
I already had to edit the Adafruit library to use i2c address 0x76 instead of its default 0x77, to work with the BME280 clone. But I'm periodically getting a temperature reading of 0.00 (in a 21C room), or sometimes even a reading of "nan". It's very rare, maybe one out of every 100 readings, and inconsistent.
Now this is a cheap chinese board with much fewer components than the Adafruit board, so it could simply be a result of a faulty breakout board design. But is there anything in the library I could try editing to prevent this? Maybe using a slower i2c speed?