Class HC2
Represents a HC2 humidity probe by Rotronic
Assembly: Hc2.dll
View Source
public class HC2 : PollingSensorBase<(RelativeHumidity? Humidity, Temperature? Temperature)>, IObservable<IChangeResult<(RelativeHumidity? Humidity, Temperature? Temperature)>>, ISamplingSensor<(RelativeHumidity? Humidity, Temperature? Temperature)>, ISensor<(RelativeHumidity? Humidity, Temperature? Temperature)>, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>, IHumiditySensor, ISamplingSensor<RelativeHumidity>, ISensor<RelativeHumidity>, ISensor, ISamplingSensor
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT>
Implements:
Expand
System.IObservable<Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>>
, Meadow.Peripherals.Sensors.ISamplingSensor<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>
, Meadow.Peripherals.Sensors.ISensor<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>
, Meadow.Peripherals.Sensors.ITemperatureSensor
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Temperature>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Temperature>
, Meadow.Peripherals.Sensors.Atmospheric.IHumiditySensor
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.RelativeHumidity>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.RelativeHumidity>
, Meadow.Peripherals.Sensors.ISensor
, Meadow.Peripherals.Sensors.ISamplingSensor
Properties
Humidity
The current relative humidity
View Source
public RelativeHumidity? Humidity { get; }
Temperature
The current temperature
View Source
public Temperature? Temperature { get; }
Fields
HumidityInputPort
Analog port connected to Humidity pin
View Source
protected IAnalogInputPort? HumidityInputPort
TemperatureInputPort
Analog port connected to Temperature pin
View Source
protected IAnalogInputPort? TemperatureInputPort
Methods
RaiseEventsAndNotify(IChangeResult<(RelativeHumidity? Humidity, Temperature? Temperature)>)
Raise all change events for subscribers
View Source
protected override void RaiseEventsAndNotify(IChangeResult<(RelativeHumidity? Humidity, Temperature? Temperature)> changeResult)
Parameters
Type | Name | Description |
---|---|---|
Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>> | changeResult | humidity and temperature |
ReadSensor()
Reads the humidity and temperature.
View Source
protected override Task<(RelativeHumidity?, Temperature?)> ReadSensor()
Returns
System.Threading.Tasks.Task<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>
Implements
System.IObservable<Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>>
Meadow.Peripherals.Sensors.ISamplingSensor<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>
Meadow.Peripherals.Sensors.ISensor<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>
Meadow.Peripherals.Sensors.ITemperatureSensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Temperature>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Temperature>
Meadow.Peripherals.Sensors.Atmospheric.IHumiditySensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.RelativeHumidity>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.RelativeHumidity>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor