RoverDHT22 is a class that is inherited from RoverSensor abstract class. RoverDHT22 class contains member functions and variables to set up and read from DHT22 temperature and humidity sensor that is embedded on the rover.
More...
#include <rover_dht22.hpp>
RoverDHT22 is a class that is inherited from RoverSensor abstract class. RoverDHT22 class contains member functions and variables to set up and read from DHT22 temperature and humidity sensor that is embedded on the rover.
rover::RoverDHT22::RoverDHT22 |
( |
| ) |
|
|
explicit |
rover::RoverDHT22::~RoverDHT22 |
( |
| ) |
|
int rover::RoverDHT22::getDHT22Pin |
( |
void |
| ) |
|
Returns the DHT22 pin in wiringPi format.
- Returns
- Pin to return as DHT22's signal in wiringPi format
void rover::RoverDHT22::initialize |
( |
void |
| ) |
|
|
virtual |
float rover::RoverDHT22::read |
( |
void |
| ) |
|
|
virtual |
Reads the temperature value from DHT22 (float).
- Returns
- temperature_val Temperature in Celcius (float).
Implements rover::RoverSensor.
float rover::RoverDHT22::readHumidity |
( |
void |
| ) |
|
Reads the humidity value from DHT22 (float).
- Returns
- humidity Humidity in Percentage (float).
float rover::RoverDHT22::readTemperature |
( |
void |
| ) |
|
Reads the temperature value from DHT22 (float).
- Returns
- temperature_val Temperature in Celcius (float).
void rover::RoverDHT22::setDHT22Pin |
( |
const int |
pin | ) |
|
Sets the DHT22 pin in wiringPi format.
- Parameters
-
pin | Pin to set as DHT22's signal in wiringPi format |
- Returns
- void
int rover::RoverDHT22::DHT22_SETUP_ |
|
private |
Flag to hold if DHT22 is set up.
int rover::RoverDHT22::DHT22Pin |
|
private |
Pin in wiringPi format for DHT22 signal.
The documentation for this class was generated from the following files: