|
Sentinel
|
Class for the DHT22 sensor. More...
#include <dht22.h>
Public Member Functions | |
| SensorDHT (uint8_t pin) | |
| void | begin () |
| Constructor for the SensorDHT class. | |
| void | update () |
| Update the temperature and humidity values. | |
| float | getTemperature () const |
| Get the temperature value. | |
| float | getHumdity () const |
| Get the humidity value. | |
Class for the DHT22 sensor.
Decalration of the DHT22 class
| void SensorDHT::begin | ( | ) |
Constructor for the SensorDHT class.
| pin | Pin number where the DHT22 sensor is connected |
| float SensorDHT::getHumdity | ( | ) | const |
Get the humidity value.
| float SensorDHT::getTemperature | ( | ) | const |
Get the temperature value.
| void SensorDHT::update | ( | ) |
Update the temperature and humidity values.
This function reads the temperature and humidity from the DHT22 sensor and updates the corresponding member variables.