Table of Contents

Class Bmp280.Sim

Namespace
Pamoja.Sensors
Assembly
Pamoja.Sensors.dll

A BMP280 that is not there, for a bus with nothing plugged in.

public static class Bmp280.Sim
Inheritance
Bmp280.Sim
Inherited Members

Remarks

A BMP280 is a BME280 without humidity, with the same temperature and pressure registers and trimming layout, so Part(byte) holds the temperature and pressure half of a real part and reads 20.44 C and 848.05 hPa.

Fields

StatusIdle

The status a simulated part reports when it is neither measuring nor loading.

public const byte StatusIdle = 0

Field Value

byte

Methods

Burst()

The six data registers a simulated part holds: one measurement a real part took.

public static byte[] Burst()

Returns

byte[]

The registers.

BurstFor(float, float)

Builds the six data registers that compensate to a reading against the simulated trimming.

public static byte[] BurstFor(float celsius, float hectopascals)

Parameters

celsius float

The temperature.

hectopascals float

The pressure.

Returns

byte[]

The bytes a burst read would return.

Calibration()

The 24 trimming bytes a simulated part holds.

public static byte[] Calibration()

Returns

byte[]

The block.

Part(byte)

Makes a part holding a real part's trimming and one measurement it took.

public static I2cPart Part(byte address)

Parameters

address byte

The address it answers to.

Returns

I2cPart

The part, to put on a simulated bus.

Reporting(byte, float, float)

Makes a part that reads what it is asked to, within a hundredth of a degree and of a hectopascal.

public static I2cPart Reporting(byte address, float celsius, float hectopascals)

Parameters

address byte

The address it answers to.

celsius float

The temperature it reports.

hectopascals float

The pressure it reports.

Returns

I2cPart

The part, to put on a simulated bus.