Class Ahtx0
Ahtx0 Temperature sensor object
Assembly: Ahtx0.dll
View Source
public abstract class Ahtx0 : ByteCommsSensorBase<(RelativeHumidity? Humidity, Temperature? Temperature)>, IObservable<IChangeResult<(RelativeHumidity? Humidity, Temperature? Temperature)>>, ISamplingSensor<(RelativeHumidity? Humidity, Temperature? Temperature)>, ISensor<(RelativeHumidity? Humidity, Temperature? Temperature)>, IDisposable, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>, IHumiditySensor, ISamplingSensor<RelativeHumidity>, ISensor<RelativeHumidity>, ISensor, ISamplingSensor, II2cPeripheral
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT>
Derived:
Meadow.Foundation.Sensors.Atmospheric.Aht10
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>>>
, System.IDisposable
, 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
, Meadow.Hardware.II2cPeripheral
Properties
DefaultI2cAddress
The default I2C address for the peripheral
View Source
public byte DefaultI2cAddress { get; }
Temperature
Last value read from the Temperature sensor.
View Source
public Temperature? Temperature { get; protected set; }
Humidity
Last value read from the humidity sensor.
View Source
public RelativeHumidity? Humidity { get; protected set; }
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>>>
System.IDisposable
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
Meadow.Hardware.II2cPeripheral