Table of Contents

Class Bmp180

Namespace
Iot.Device.Bmp180
Assembly
Iot.Device.Bmp180.dll

BMP180 - barometer, altitude and temperature sensor.

[Interface("BMP180 - barometer, altitude and temperature sensor")]
public class Bmp180
Inheritance
Bmp180

Constructors

Bmp180(I2cDevice)

Initializes a new instance of theBmp180 class.

public Bmp180(I2cDevice i2cDevice)

Parameters

i2cDevice I2cDevice

I2C device used to communicate with the device.

Fields

DefaultI2cAddress

Default I2C address.

public const byte DefaultI2cAddress = 119

Field Value

byte

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

ReadAltitude()

Calculates the altitude in meters from the mean sea-level pressure.

public Length ReadAltitude()

Returns

Length

Height in meters above sea level.

ReadAltitude(Pressure)

Calculates the altitude in meters from the specified sea-level pressure.

public Length ReadAltitude(Pressure seaLevelPressure)

Parameters

seaLevelPressure Pressure

Sea-level pressure.

Returns

Length

Height above sea level.

ReadPressure()

Reads the pressure from the sensor.

[Telemetry("Pressure")]
public Pressure ReadPressure()

Returns

Pressure

Atmospheric pressure.

ReadSeaLevelPressure()

Calculates the pressure at sea level, when the current altitude is 0.

public Pressure ReadSeaLevelPressure()

Returns

Pressure

Pressure.

ReadSeaLevelPressure(Length)

Calculates the pressure at sea level when given a known altitude.

public Pressure ReadSeaLevelPressure(Length altitude)

Parameters

altitude Length

Altitude in meters.

Returns

Pressure

Pressure.

ReadTemperature()

Reads the temperature from the sensor.

[Telemetry("Temperature")]
public Temperature ReadTemperature()

Returns

Temperature

Temperature in degrees celsius.

SetSampling(Sampling)

Sets sampling to the given value.

public void SetSampling(Sampling mode)

Parameters

mode Sampling

Sampling Mode.