Doc update for bme280.lua (#3384)

- Changed the note about bme280_math dependency into a blue note box, like in the [bh1750 documentation](https://nodemcu.readthedocs.io/en/release/lua-modules/bh1750/)
- Added a paragraph on differentiating between BMP280 and BME280 sensors. It put it in an orange caution box for now, might be too visible for a rare problem.
- Small fixes in bme280.setup() description
This commit is contained in:
Fivefold 2021-01-24 20:33:46 +01:00 committed by GitHub
parent fc1085084f
commit 2f452b22b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -5,11 +5,19 @@
This module communicates with [BME280/BMP280 temperature/air presssure/humidity sensors](http://www.bosch-sensortec.com/bst/products/all_products/bme280) (Bosch Sensortec) through [I2C](../modules/i2c.md) interface. This module communicates with [BME280/BMP280 temperature/air presssure/humidity sensors](http://www.bosch-sensortec.com/bst/products/all_products/bme280) (Bosch Sensortec) through [I2C](../modules/i2c.md) interface.
Note: the module works only with the [bme280_math](../modules/bme280_math) module. !!! note
The module works only with the [bme280_math](../modules/bme280_math) module.
!!! caution
The BMP280 only supports temperature and air pressure measurements. It will give wrong readings for humidity but no warnings or errors. Sometimes sellers of breakout boards for these sensors confuse the two and sell one as the other.
To easily check if you have a BMP280 or a BME280 look at the shape of the sensor: The BMP280 has rectangular shape, whereas the BME280 has a square one.
## bme280.setup() ## bme280.setup()
Creates bme280sensor object and initializes module. Initialization is mandatory before read values. Note that there has to be a delay between some tens to hundreds of milliseconds between calling `setup()` and reading measurements. Creates bme280sensor object and initializes the module. Initialization is mandatory before reading values. Note that there has to be a delay between some tens to hundreds of milliseconds between calling `setup()` and reading measurements.
Functions supported by bme280sensor object: Functions supported by bme280sensor object:
- [setup()](#sobjsetup) - [setup()](#sobjsetup)