Coder Social home page Coder Social logo

Comments (5)

coelner avatar coelner commented on June 13, 2024

IMHO I think it is a bug and you can solve it by make two measurements.
(and you get Pa not hPa)

@finitespace

  • In BME280I2C.h you use filter_16, in all other settings Filter_Off
  • do we now how long a measurement takes? I can't find a value in the datasheet
  • Maybe a problem with data register shadowing?
  • add in the oversampling enum a zero value for disabling this feature.
  • check for register 0xF3 "status" for measuring and wait

from bme280.

finitespace avatar finitespace commented on June 13, 2024

Yes, @coelner is correct, I recently changed the Filter to 16 to provide more stable measurements (I think there is a typo in his post: I think he meant change the filter not the oversampling).

The filter works by aggregating the last X samples together. So a larger filter requires more time to fill the buffer, when you reset, I would guess these values are set to their default, so it would make sense for the first read to give bogus data. I can go look at the datasheet later to see if they have any insight on this.

You can do one of two things:

  1. Ignore the first read until the buffer has been populated.
  2. Set the filter to off. This will provide the instantaneous value instead of the more reliable aggregated value.

from bme280.

coelner avatar coelner commented on June 13, 2024

@finitespace the part behind your name was only my thought while searching for the issue. Not directly related to this issue.

from bme280.

finitespace avatar finitespace commented on June 13, 2024

Alright, I have added a routine to initialize the filter buffer. Could you pull down the filtering branch and check if it fixes the problem?

from bme280.

finitespace avatar finitespace commented on June 13, 2024

I have created a pull request for this issue, I will leave it open for a little to allow review before I merge the changes. #81

from bme280.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.