Syntax
public class Lm75 : FilterableChangeObservableBase<AtmosphericConditionChangeResult, AtmosphericConditions>, IObservable<AtmosphericConditionChangeResult>, IAtmosphericSensor, ITemperatureSensor
Constructors
Lm75(II2cBus, Byte)
Create a new TMP102 object using the default configuration for the sensor.
Declaration
public Lm75(II2cBus i2cBus, byte address = 72)
Parameters
Type |
Name |
Description |
II2cBus |
i2cBus |
|
System.Byte |
address |
I2C address of the sensor.
|
Properties
Conditions
The AtmosphericConditions from the last reading.
Declaration
public AtmosphericConditions Conditions { get; protected set; }
Property Value
Type |
Description |
AtmosphericConditions |
|
DEFAULT_ADDRESS
Declaration
public byte DEFAULT_ADDRESS { get; }
Property Value
Type |
Description |
System.Byte |
|
IsSampling
Gets a value indicating whether the analog input port is currently
sampling the ADC. Call StartSampling() to spin up the sampling process.
Declaration
public bool IsSampling { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
true if sampling; otherwise, false .
|
Temperature
The temperature, in degrees celsius (°C), from the last reading.
Declaration
public float Temperature { get; }
Property Value
Type |
Description |
System.Single |
|
Methods
RaiseChangedAndNotify(AtmosphericConditionChangeResult)
Declaration
protected void RaiseChangedAndNotify(AtmosphericConditionChangeResult changeResult)
Parameters
Type |
Name |
Description |
AtmosphericConditionChangeResult |
changeResult |
|
Read()
Convenience method to get the current sensor readings. For frequent reads, use
StartSampling() and StopSampling() in conjunction with the SampleBuffer.
Declaration
public Task<AtmosphericConditions> Read()
Returns
Type |
Description |
System.Threading.Tasks.Task<AtmosphericConditions> |
|
StartUpdating(Int32)
Declaration
public void StartUpdating(int standbyDuration = 1000)
Parameters
Type |
Name |
Description |
System.Int32 |
standbyDuration |
|
StopUpdating()
Stops sampling the temperature.
Declaration
public void StopUpdating()
Update()
Update the Temperature property.
Declaration
Events
Updated
Declaration
public event EventHandler<AtmosphericConditionChangeResult> Updated
Event Type
Type |
Description |
System.EventHandler<AtmosphericConditionChangeResult> |
|