# Pimoroni BME280

**URL:** <https://forums.pimoroni.com/t/pimoroni-bme280/27980>\
**Category:** Support\
**Created:** [July 4, 2025, 10:01am UTC](https://forums.pimoroni.com/t/pimoroni-bme280/27980 "2025-07-04T10:01:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stg](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@stg](https://forums.pimoroni.com/u/stg)\
**Post date:** [July 4, 2025, 10:01am UTC](https://forums.pimoroni.com/t/pimoroni-bme280/27980/1 "2025-07-04T10:01:09Z")

</div>

Hello,  
I have a little trouble with one of my many Pimoroni BME280.  
To make sure the reading a accurate I poll the BME280’s 4 times in a loop and take the last set of readings.

Every now and again the reading respond back with what appears to be default data ie..  
Temp C = 21.62  
Humidity = 61.18  
Pressure = 657.52  
These results persist for several hours regardless of reboots etc

I have swapped the Raspberry Pi Zero 2 with another and still happens. Even using the Pimoroni BME280 all-values.py example I get the same results.

I suspect the BME to have a problem, can any one confirm (Not looking for a refund as these were bought 2 years ago)

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [July 4, 2025, 12:35pm UTC](https://forums.pimoroni.com/t/pimoroni-bme280/27980/2 "2025-07-04T12:35:31Z")

</div>

Can you check your program and see if it operates the BME280 in “normal mode” or “forced mode”? The latter is for environmental monitoring and the former for things like indoor navigation.  
Also, you should not use any oversampling. [pimoroni-pico/micropython/modules/breakout\_bme280 at main · pimoroni/pimoroni-pico · GitHub](https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/modules/breakout_bme280)

You should read the section 3.5.1 of the datasheet for how to operate the BME280. Too bad that the defaults of the Pimoroni drivers are far away from these recommendations.

 ![Bildschirmfoto_2025-07-04_14-34-12](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/d/df681561a0f28d2a7537e95026ab849e24f7d6f1.png)

---

<div class="post-metadata">

**Author:** ![stg](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@stg](https://forums.pimoroni.com/u/stg)\
**Post date:** [July 5, 2025, 10:03am UTC](https://forums.pimoroni.com/t/pimoroni-bme280/27980/3 "2025-07-05T10:03:03Z")

</div>

Thanks for the reply.

I am using it as normal mode.

Your oversampling link is for the Pico, anyway I have not setup for oversampling. I just run the following code in a loop 4 times then take the last reading as data. The first request is usually inaccurate, so just 4 times and then take the data

```auto

# Initialise the BME280
bus = SMBus(1)
bme280 = BME280(i2c_dev=bus)

while counter < 5:
    counter = 1
    temperature = bme280.get_temperature()
    pressure = bme280.get_pressure()
    humidity = bme280.get_humidity()
    print(f"{temperature:05.2f}°C {pressure:05.2f}hPa {humidity:05.2f}%")
    counter = counter + 1
    time.sleep(1)

```

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [July 5, 2025, 10:39am UTC](https://forums.pimoroni.com/t/pimoroni-bme280/27980/4 "2025-07-05T10:39:48Z")

</div>

Sorry for the wrong link, but the normal Python driver is not better.

You are using the defaults, and the defaults use 16x oversampling:

> <https://github.com/pimoroni/bme280-python/blob/fff91c86c958f666202c7c8713b6aa7d7d9bb955/bme280/ __init__.py#L203>

And in addition, you oversample again 4 times in a loop (at least you try to do that - but you don’t, since your counter is initialized within the loop and not outside). So this puts the sensor under real stress, you are effectively reading the sensor (4x) 3x16 times.

So the first thing to do is to manually call `bme280.setup(...)` directly after you created `bme280` and feed in the correct mode (forced) and oversample settings. And reading the sensor once is all you need.
