Commit 0a11e84f authored by Marcel Stör's avatar Marcel Stör
Browse files

Add note to BME280 docs

A delay is required between `setup` and reading from sensor.

Fixes #1994.
parent 003c2453
...@@ -5,7 +5,10 @@ ...@@ -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, ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment