Skip to content

First reading always the same, and always incorrect. #35

@ecnelson

Description

@ecnelson

First set of readings from BME280 driver are incorrect, and always the same. If you wait a bit they're correct (and they do fluctuate).

pi@crouton:~ $ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from bme280 import BME280
>>> b = BME280(i2c_addr = 0x77)
>>> b.get_pressure(), b.get_pressure(), b.get_pressure(), b.get_pressure()
(684.6845353898584, 684.6845353898584, 684.6845353898584, 684.6845353898584)
>>># wait awhile...
>>> b.get_pressure(), b.get_pressure(), b.get_pressure(), b.get_pressure()
(848.8356787747891, 848.8356787747891, 848.8356787747891, 848.8356787747891)
>>> b.get_pressure(), b.get_pressure(), b.get_pressure(), b.get_pressure()
(848.8544261068524, 848.8544261068524, 848.8544261068524, 848.8544261068524)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions