DhtBase Class

Definition

Temperature and Humidity Sensor DHTxx

public abstract class DhtBase : IDisposable
[System.Device.Model.Interface("Temperature and Humidity Sensor DHTxx")]
public abstract class DhtBase : IDisposable
type DhtBase = class
    interface IDisposable
[<System.Device.Model.Interface("Temperature and Humidity Sensor DHTxx")>]
type DhtBase = class
    interface IDisposable
Public MustInherit Class DhtBase
Implements IDisposable
Inheritance
DhtBase
Derived
Attributes
Implements

Constructors

DhtBase(I2cDevice)

Create a DHT sensor through I2C (Only DHT12)

DhtBase(Int32, PinNumberingScheme)
DhtBase(Int32, PinNumberingScheme, GpioController, Boolean)

Create a DHT sensor

Fields

_controller

GpioController related with the _pin.

_i2cDevice

I2C device used to communicate with the device

_isLastReadSuccessful

True when the last read values are valid

_pin

GPIO pin

_readBuff

Read buffer

_shouldDispose

True to dispose the Gpio Controller

Properties

Humidity
Obsolete.

Get the last read of relative humidity in percentage

IsLastReadSuccessful
Obsolete.

How last read went, true for success, false for failure

MinTimeBetweenReads

Gets or sets the minimum time between sensor reads. When querying the sensor faster than this, the last values will be returned (whether valid or not)

Temperature
Obsolete.

Get the last read temperature

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

TryReadHumidity(RelativeHumidity)

Returns the current relative humidity

TryReadTemperature(Temperature)

Returns the current temperature

Applies to