Table of Contents

Class Bme280Calibration

Namespace
Pamoja.Sensors
Assembly
Pamoja.Sensors.dll

A BME280's factory calibration, read once and reused for every measurement.

public sealed class Bme280Calibration : IDisposable
Inheritance
Bme280Calibration
Implements
Inherited Members

Constructors

Bme280Calibration(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

Builds a calibration from the bytes read out of the registers.

public Bme280Calibration(ReadOnlySpan<byte> tempPress, ReadOnlySpan<byte> humidity)

Parameters

tempPress ReadOnlySpan<byte>

The 26-byte temperature and pressure block.

humidity ReadOnlySpan<byte>

The 7-byte humidity block.

Exceptions

PamojaException

Either block is the wrong length.

Methods

Compensate(ReadOnlySpan<byte>)

Turns an eight-byte burst read into a compensated reading.

public Bme280Measurement Compensate(ReadOnlySpan<byte> measurement)

Parameters

measurement ReadOnlySpan<byte>

The eight measurement registers.

Returns

Bme280Measurement

The compensated reading.

Exceptions

PamojaException

The measurement is not eight bytes.

Dispose()

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

public void Dispose()