DHT22Gen3_RK
Public Member Functions
DHTSensorTypeDHT11 Class Reference

DHTSensorType object to decode DHT11 sensor data. More...

#include <DHT22Gen3_RK.h>

Inheritance diagram for DHTSensorTypeDHT11:
DHTSensorType

Public Member Functions

 DHTSensorTypeDHT11 ()
 Constructor for DHT11 sensor type. More...
 
virtual float getTempC (const DHTSample &sample) const
 For the sample, convert it into degrees C based on the sensor type. More...
 
virtual float getHumidity (const DHTSample &sample) const
 For the sample, convert it into percent humidity (0-100) based on the sensor type. More...
 
- Public Member Functions inherited from DHTSensorType
 DHTSensorType (const char *name, unsigned long minSamplePeriodMs, unsigned long oneBitThreshold)
 Constructor for a sensor type. More...
 
virtual ~DHTSensorType ()
 Destructor.
 

Additional Inherited Members

- Data Fields inherited from DHTSensorType
const char * name
 Short name of sensor.
 
unsigned long minSamplePeriodMs
 Minimum period between samples.
 
int oneBitThreshold
 Threshold in number of I2S bits for a 1-bit.
 

Detailed Description

DHTSensorType object to decode DHT11 sensor data.

Constructor & Destructor Documentation

◆ DHTSensorTypeDHT11()

DHTSensorTypeDHT11::DHTSensorTypeDHT11 ( )

Constructor for DHT11 sensor type.

You normally don't need to instantiate one of these; there's one pre-allocated in DHT22Gen3::sensorTypeDHT11.

Member Function Documentation

◆ getHumidity()

float DHTSensorTypeDHT11::getHumidity ( const DHTSample sample) const
virtual

For the sample, convert it into percent humidity (0-100) based on the sensor type.

Parameters
sampleThe sample data to convert

Implements DHTSensorType.

◆ getTempC()

float DHTSensorTypeDHT11::getTempC ( const DHTSample sample) const
virtual

For the sample, convert it into degrees C based on the sensor type.

Parameters
sampleThe sample data to convert

Implements DHTSensorType.


The documentation for this class was generated from the following files: