Class Bme280.Sim
A BME280 that is not there, for a bus with nothing plugged in.
public static class Bme280.Sim
- Inheritance
-
Bme280.Sim
- Inherited Members
Fields
StatusIdle
The status a simulated part reports when it is neither measuring nor loading.
public const byte StatusIdle = 0
Field Value
Methods
Burst()
The eight data registers a simulated part holds: one measurement a real part took.
public static byte[] Burst()
Returns
- byte[]
The registers.
BurstFor(float, float, float)
Builds the eight data registers that compensate to a reading against the simulated calibration.
public static byte[] BurstFor(float celsius, float hectopascals, float relativeHumidity)
Parameters
celsiusfloatThe temperature.
hectopascalsfloatThe pressure.
relativeHumidityfloatThe humidity, as a percentage.
Returns
- byte[]
The bytes a burst read would return.
Calibration()
The 26-byte temperature and pressure calibration block a simulated part holds.
public static byte[] Calibration()
Returns
- byte[]
The block.
CalibrationHumidity()
The 7-byte humidity calibration block a simulated part holds.
public static byte[] CalibrationHumidity()
Returns
- byte[]
The block.
Part(byte)
Makes a part holding a real BME280's calibration and one measurement it took, which compensate to 20.44 C, 848.05 hPa, and 44.65 %.
public static I2cPart Part(byte address)
Parameters
addressbyteThe address it answers to.
Returns
- I2cPart
The part, to put on a simulated bus.
Reporting(byte, float, float, float)
Makes a part that reads what it is asked to, to within what its converter can represent.
public static I2cPart Reporting(byte address, float celsius, float hectopascals, float relativeHumidity)
Parameters
addressbyteThe address it answers to.
celsiusfloatThe temperature it reports.
hectopascalsfloatThe pressure it reports.
relativeHumidityfloatThe humidity it reports, as a percentage.
Returns
- I2cPart
The part, to put on a simulated bus.