Преглед на файлове

Add note to BME280 docs

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

Fixes #1994.
Marcel Stör преди 6 години
родител
ревизия
0a11e84f36
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      docs/en/modules/bme280.md

+ 5 - 1
docs/en/modules/bme280.md

@@ -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).
 
-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()
 
@@ -215,6 +218,7 @@ print(string.format("altitude=%s%d.%02d", curAltsgn<0 and "-" or "", curAlt/100,
 ```
 
 Or simpler and more efficient
+
 ```lua
 alt=320 -- altitude of the measurement place