Add note to BME280 docs
A delay is required between `setup` and reading from sensor. Fixes #1994.
This commit is contained in:
parent
003c2453c3
commit
0a11e84f36
|
@ -5,7 +5,10 @@
|
||||||
|
|
||||||
This module provides a simple interface to [BME280/BMP280 temperature/air presssure/humidity sensors](http://www.bosch-sensortec.com/bst/products/all_products/bme280) (Bosch Sensortec).
|
This module provides a simple interface to [BME280/BMP280 temperature/air presssure/humidity sensors](http://www.bosch-sensortec.com/bst/products/all_products/bme280) (Bosch Sensortec).
|
||||||
|
|
||||||
Note that you must call [`setup()`](#bme280setup) before you can start reading values!
|
!!! caution
|
||||||
|
|
||||||
|
Note that you must call [`setup()`](#bme280setup) before you can start reading values! Furthermore, there has to be a variable delay between some tens to hundreds of milliseconds between `setup()` and reading measurements. Instead of using a fixed delay you might also poll the sensor until data is delivered e.g. `humi()` not returning `nil` anymore.
|
||||||
|
|
||||||
|
|
||||||
## bme280.altitude()
|
## bme280.altitude()
|
||||||
|
|
||||||
|
@ -215,6 +218,7 @@ print(string.format("altitude=%s%d.%02d", curAltsgn<0 and "-" or "", curAlt/100,
|
||||||
```
|
```
|
||||||
|
|
||||||
Or simpler and more efficient
|
Or simpler and more efficient
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
alt=320 -- altitude of the measurement place
|
alt=320 -- altitude of the measurement place
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue