Skip to content

enumerated

Arnd edited this page Dec 11, 2020 · 3 revisions

Enumerated Types

Several enumerated Types / constants are declared in the library and can be used as parameters to BME280 functions rather than having to type in the associated number. The types are as follow:

Modes

The mode() function allows the operating mode of the BME280 to be set. There are 3 keywords that can be used as parameters: "SleepMode", "ForcedMode" and "NormalMode"

Sensors

The functions setOversampling() and getOversampling() allow turning off each of the BME280 sensor individually as well as setting/retrieving the oversampling rates. There are 3 keywords that can be used as parameters: "TemperatureSensor", "HumiditySensor" and "PressureSensor" to indicate which sensor to use.

Oversampling

The functions setOversampling() and getOversampling() allow oversampling rates to be set for each of the 3 sensing components of the BME280, the keywords that can be used as parameters here are: "SensorOff", "Oversample1", "Oversample2", "Oversample4", "Oversample8" and "Oversample16" to indicate which level of oversampling to use.

IIR Filters

The iirFilter() function allows setting the IIR filter value. The keywords that can be used as parameters here are: "IIROff", "IIR2", "IIR4", "IIR8" and "IIR16".

Inactive Times

The inactiveTime() function allows setting the pause time between measurements while in normal mode to a number of possible values: "inactiveHalf", "inactive63ms", "inactive125ms", "inactive250ms", "inactive500ms", "inactive1000ms", "inactive10ms", "inactive20ms".

Measure Times

The measurementTime() function returns the computed time it takes to perform one measurement cycle. There are two values that can be used as the parameter, either "TypicalMeasure" or "MaximumMeasure" to return either the typical time or the maximum possible measurement time.