Skip to content

Commit

Permalink
Doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vsky committed Jul 11, 2020
1 parent 6c44e23 commit 4baaaf6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
14 changes: 13 additions & 1 deletion docs/lua-modules/bme280.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Creates bme280sensor object and initializes module. Initialization is mandatory

Functions supported by bme280sensor object:
- [setup()](#sobjsetup)
- [read()](#sobjresad)
- [read()](#sobjread)
- [startreadout()](#sobjstartreadout)
- [qfe2qnh](#sobjqfe2qnh)
- [altitude](#sobjaltitude)
Expand Down Expand Up @@ -73,6 +73,18 @@ Using forced mode is recommended for applications which require low sampling rat

## BME280 Sensor Object Methods

### sobj:setup()

Re-initializes the sensor.

### Parameters

Parameters are the same as for the [bme280.setup](#bme280setup) function.

### Return

Returned values are the same as for the [bme280.setup](#bme280setup) function.

### sobj:altitude()

For given air pressure (called QFE in aviation - see [wiki QNH article](https://en.wikipedia.org/wiki/QNH)) and sea level air pressure returns the altitude in meters, i.e. altimeter function.
Expand Down
24 changes: 12 additions & 12 deletions docs/modules/bme280_math.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BME280 module
# BME280_math module
| Since | Origin / Contributor | Maintainer | Source |
| :----- | :-------------------- | :---------- | :------ |
| 2016-02-21 | [vsky279](https://github.com/vsky279) | [vsky279](https://github.com/vsky279) | [bme280_math.c](../../app/modules/bme280_math.c)|
Expand All @@ -7,12 +7,12 @@ This module provides calculation routines for [BME280/BMP280 temperature/air pre

See [bme280](../lua-modules/bme280.md) Lua module for examples.

## bme280.altitude()
## bme280_math.altitude()

For given air pressure (called QFE in aviation - see [wiki QNH article](https://en.wikipedia.org/wiki/QNH)) and sea level air pressure returns the altitude in meters, i.e. altimeter function.

#### Syntax
`bme280.altitude([self], P, QNH)`
`bme280_math.altitude([self], P, QNH)`

#### Parameters
- (optional) `self` userdata or table structure so that the function can be directly called as object method, parameter is ignored in the calculation
Expand All @@ -22,12 +22,12 @@ For given air pressure (called QFE in aviation - see [wiki QNH article](https://
#### Returns
altitude in meters of measurement point

## bme280.dewpoint()
## bme280_math.dewpoint()

For given temperature and relative humidity returns the dew point in celsius.

#### Syntax
`bme280.dewpoint([self], H, T)`
`bme280_math.dewpoint([self], H, T)`

#### Parameters
- (optional) `self` userdata or table structure so that the function can be directly called as object method, parameter is ignored in the calculation
Expand All @@ -37,12 +37,12 @@ For given temperature and relative humidity returns the dew point in celsius.
#### Returns
dew point in celsisus

## bme280.qfe2qnh()
## bme280_math.qfe2qnh()

For given altitude converts the air pressure to sea level air pressure ([QNH](https://en.wikipedia.org/wiki/QNH)).

#### Syntax
`bme280.qfe2qnh([self], P, altitude)`
`bme280_math.qfe2qnh([self], P, altitude)`

#### Parameters
- (optional) `self` userdata or table structure so that the function can be directly called as object method, parameter is ignored in the calculation
Expand All @@ -53,15 +53,15 @@ For given altitude converts the air pressure to sea level air pressure ([QNH](ht
sea level pressure


## bme280.read()
## bme280_math.read()

Reads the sensor and returns the temperature, the air pressure, the air relative humidity and see level air pressure when `altitude` is specified.

#### Syntax
`bme280.read(bme280sensor, registers, [altitude])`
`bme280_math.read(bme280sensor, registers, [altitude])`

#### Parameters
- `bme280sensor` - BME280 sensor user data returned by `bme280.setup()`
- `bme280sensor` - BME280 sensor user data returned by `bme280_math.setup()`
- `registers` - string of 8 bytes (chars) registers read from `BME280_REGISTER_PRESS`
- (optional) `altitude`- altitude in meters of measurement point. If provided also the air pressure converted to sea level air pressure is returned.

Expand All @@ -73,13 +73,13 @@ Reads the sensor and returns the temperature, the air pressure, the air relative

Returns `nil` if the conversion is not successful.

## bme280.setup()
## bme280_math.setup()

Initializes module. Initialization is mandatory before read values.

#### Syntax

`bme280.setup(registers, [temp_oss, press_oss, humi_oss, power_mode, inactive_duration, IIR_filter])`
`bme280_math.setup(registers, [temp_oss, press_oss, humi_oss, power_mode, inactive_duration, IIR_filter])`

#### Parameters
- registers - String of configuration registers read from the BME280 sensor. It consists of 6 bytes (chars) of `BME280_REGISTER_DIG_T`, 18 bytes (chars) `BME280_REGISTER_DIG_P` and optional (not present for BMP280 sensor) 8 bytes (chars) of `BME280_REGISTER_DIG_H1` (1 byte) and `BME280_REGISTER_DIG_H2` (7 bytes)
Expand Down

0 comments on commit 4baaaf6

Please sign in to comment.