robert-hh / BME280

Micropython driver for the BME280 sensor, target platform Pycom devices
Other
103 stars 26 forks source link

Humidity values > 100% being reported #13

Closed dakin80 closed 7 months ago

dakin80 commented 7 months ago

I'm using a BME280 in a weather station. The sensor is contained in a 3D printed Stevenson screen and I believe it is fairly well protected from the direct effects of rainfall. I may at some future stage add a breathable membrane to the design to stop snow getting in.

I'm encountering the code returning compensated humidity values of greater than 100% when there is heavy rainfall. The reported humidity does drop down to less than 100% afterwards. Here's a graph showing the period of high humidity.

Screenshot from 2024-02-05 10-31-44

The reference Bosch C API does appear to include code to clamp the reported values between 0 and 100% but these appear to be commented out in the MicroPython version.

Should the code be changed to include the clamping of values?

robert-hh commented 7 months ago

Could be done. It may have been commented our for testing. Also, not all ports supported themin/max functions.

robert-hh commented 7 months ago

Range clamped and files updates. Thanks for the notification.