Skip to content

Commit

Permalink
Doc update for bme280.lua (#3384)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Fivefold authored Jan 24, 2021
1 parent fc10850 commit 2f452b2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/lua-modules/bme280.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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()

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:
- [setup()](#sobjsetup)
Expand Down

0 comments on commit 2f452b2

Please sign in to comment.