Back

The BME280 is an excellent (and cheap) chip from Bosch that you can use in your microcontroller projects to read the temperature, humidity, and pressure of your environment.

A common complaint is that the chip is "reading too high". A look at the datasheet will reveal the answer. Section 3.5 defines "Recommended modes of operation" and gives guidelines for weather monitoring:

In normal mode the chip will be continually polling sensors and reading data into onboard memory. Current consumption is also much higher - 633 micro amps, compared to 0.16 micro amps. Current generates heat, and this heat leads to inaccurate readings.

The following snippet (sans error checking) is working well for me, with Arduino and ESP32.

void setup() {
    bme.begin(BME280_ADD);
    bme.setSampling(
        bme.MODE_FORCED,
        bme.SAMPLING_X1,
        bme.SAMPLING_X1,
        bme.SAMPLING_X1,
        bme.FILTER_OFF
    );
}

void loop() {
    bme.takeForcedMeasurement();
    delay(60 * 1000);
}