Skip to main content

Class Ahtx0

Ahtx0 Temperature sensor object

Assembly: Ahtx0.dll
View Source
Declaration
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
Declaration
public byte DefaultI2cAddress { get; }

Temperature

Last value read from the Temperature sensor.

View Source
Declaration
public Temperature? Temperature { get; protected set; }

Humidity

Last value read from the humidity sensor.

View Source
Declaration
public RelativeHumidity? Humidity { get; protected set; }

Methods

RaiseEventsAndNotify(IChangeResult<(RelativeHumidity? Humidity, Temperature? Temperature)>)

Raise all change events for subscribers

View Source
Declaration
protected override void RaiseEventsAndNotify(IChangeResult<(RelativeHumidity? Humidity, Temperature? Temperature)> changeResult)
Parameters
TypeNameDescription
Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.RelativeHumidity>,System.Nullable<Meadow.Units.Temperature>>>changeResulthumidity and temperature

ReadSensor()

Reads the humidity and temperature.

View Source
Declaration
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