DHT22Gen3_RK
Public Member Functions
DHTSensorTypeDHT22 Class Reference

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

#include <DHT22Gen3_RK.h>

Inheritance diagram for DHTSensorTypeDHT22:
DHTSensorType

Public Member Functions

 DHTSensorTypeDHT22 ()
 Constructor for DHT22 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 DHT22 sensor data.

Constructor & Destructor Documentation

◆ DHTSensorTypeDHT22()

DHTSensorTypeDHT22::DHTSensorTypeDHT22 ( )

Constructor for DHT22 sensor type.

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

Member Function Documentation

◆ getHumidity()

float DHTSensorTypeDHT22::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 DHTSensorTypeDHT22::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: