Abstract base class for all types of sensor.
More...
#include <DHT22Gen3_RK.h>
Abstract base class for all types of sensor.
◆ DHTSensorType()
DHTSensorType::DHTSensorType |
( |
const char * |
name, |
|
|
unsigned long |
minSamplePeriodMs, |
|
|
unsigned long |
oneBitThreshold |
|
) |
| |
|
inline |
Constructor for a sensor type.
- Parameters
-
name | Short descriptive name (DHT11, DHT22) |
minSamplePeriodMs | Minimum number of milliseconds between queries to the sensor |
oneBitThreshold | Number of counts for the bit in the I2S buffer to be considered a 1 bit |
◆ getHumidity()
virtual float DHTSensorType::getHumidity |
( |
const DHTSample & |
sample | ) |
const |
|
pure virtual |
For the sample, convert it into percent humidity (0-100) based on the sensor type.
- Parameters
-
sample | The sample data to convert |
Implemented in DHTSensorTypeDHT22, and DHTSensorTypeDHT11.
◆ getTempC()
virtual float DHTSensorType::getTempC |
( |
const DHTSample & |
sample | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: