Search Results for

    Show / Hide Table of Contents

    Class Bme280

    Represents a BME280 temperature, barometric pressure and humidity sensor.

    Inheritance
    object
    Bmxx80Base
    Bmx280Base
    Bme280
    Inherited Members
    Bmx280Base.DefaultI2cAddress
    Bmx280Base.SecondaryI2cAddress
    Bmx280Base.OsToMeasCycles
    Bmx280Base.TryReadTemperature(out Temperature)
    Bmx280Base.ReadPowerMode()
    Bmx280Base.TryReadPressure(out Pressure)
    Bmx280Base.TryReadAltitude(Pressure, out Length)
    Bmx280Base.TryReadAltitude(out Length)
    Bmx280Base.ReadStatus()
    Bmx280Base.SetPowerMode(Bmx280PowerMode)
    Bmx280Base.TryReadTemperatureCore(out Temperature)
    Bmx280Base.TryReadPressureCore(out Pressure, bool)
    Bmx280Base.FilterMode
    Bmx280Base.StandbyTime
    Bmxx80Base.Reset()
    Bmxx80Base.CompensateTemperature(int)
    Bmxx80Base.Read8BitsFromRegister(byte)
    Bmxx80Base.Read16BitsFromRegister(byte, Bmxx80Base.Endianness)
    Bmxx80Base.Read24BitsFromRegister(byte, Bmxx80Base.Endianness)
    Bmxx80Base.ByteToSampling(byte)
    Bmxx80Base.Dispose()
    Bmxx80Base.Dispose(bool)
    Bmxx80Base.TemperatureFine
    Bmxx80Base.TempCalibrationFactor
    Bmxx80Base.PressureSampling
    Bmxx80Base.TemperatureSampling
    Bmxx80Base.ControlRegister
    Bmxx80Base.CommunicationProtocol1
    Bmxx80Base.I2cDevice
    Namespace: Iot.Device.Bmxx80
    Assembly: Iot.Device.Bmxx80.dll
    Syntax
    [Interface("Represents a BME280 temperature, barometric pressure and humidity sensor.")]
    public class Bme280 : Bmx280Base

    Constructors

    Bme280(I2cDevice)

    Initializes a new instance of the Bme280 class.

    Declaration
    public Bme280(I2cDevice i2cDevice)
    Parameters
    Type Name Description
    I2cDevice i2cDevice

    The I2cDevice to create with.

    Properties

    HumiditySampling

    Gets or sets the humidity sampling.

    Declaration
    [Property]
    public Sampling HumiditySampling { get; set; }
    Property Value
    Type Description
    Sampling
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when the Sampling is set to an undefined mode.

    Methods

    GetMeasurementDuration()

    Gets the required time in ms to perform a measurement with the current sampling modes.

    Declaration
    public override int GetMeasurementDuration()
    Returns
    Type Description
    int

    The time it takes for the chip to read data in milliseconds rounded up.

    Overrides
    Bmx280Base.GetMeasurementDuration()

    Read()

    Performs a synchronous reading.

    Declaration
    public Bme280ReadResult Read()
    Returns
    Type Description
    Bme280ReadResult

    Bme280ReadResult

    SetDefaultConfiguration()

    Sets the default configuration for the sensor.

    Declaration
    protected override void SetDefaultConfiguration()
    Overrides
    Bmx280Base.SetDefaultConfiguration()

    TryReadHumidity(out RelativeHumidity)

    Reads the humidity. A return value indicates whether the reading succeeded.

    Declaration
    [Telemetry("Humidity")]
    public bool TryReadHumidity(out RelativeHumidity humidity)
    Parameters
    Type Name Description
    RelativeHumidity humidity

    Contains the measured humidity as %rH if the HumiditySampling was not set to Skipped. Contains an undefined value if the return value is false.

    Returns
    Type Description
    bool
    true
    if measurement was not skipped, otherwise
    false
    .
    In This Article
    Back to top Copyright © 2023 nanoFramework Contributors
    Generated by DocFX