![]() |
MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
|
A template class to interface with the DHT11 temperature & humidity sensor. More...
#include <MiniR4_DHT11.h>
Public Member Functions | |
MiniR4DHT11 () | |
void | setDelay (unsigned long delay) |
Sets the delay between consecutive sensor readings. | |
float | readTemperature () |
Reads and returns the temperature from the DHT11 sensor. | |
int | readHumidity () |
Reads and returns the humidity from the DHT11 sensor. | |
int | readTemperatureHumidity (float &temperature, int &humidity) |
String | getErrorString (int errorCode) |
Static Public Attributes | |
static const int | ERROR_CHECKSUM = 254 |
static const int | ERROR_TIMEOUT = 253 |
static const int | TIMEOUT_DURATION = 1000 |
A template class to interface with the DHT11 temperature & humidity sensor.
This class provides methods to read temperature and humidity data from a DHT11 sensor, as well as error handling mechanisms.
PIN1 | Unused in current implementation, can be defined for future expansions. |
PIN2 | The GPIO pin connected to the DHT11 sensor. |
Definition at line 31 of file MiniR4_DHT11.h.
|
inline |
Definition at line 34 of file MiniR4_DHT11.h.
|
inline |
Converts error codes into human-readable strings.
errorCode | Error code to convert. |
Definition at line 127 of file MiniR4_DHT11.h.
|
inline |
Reads and returns the humidity from the DHT11 sensor.
Definition at line 87 of file MiniR4_DHT11.h.
|
inline |
Reads and returns the temperature from the DHT11 sensor.
Definition at line 66 of file MiniR4_DHT11.h.
|
inline |
Reads temperature and humidity.
temperature | Reference to store temperature. |
humidity | Reference to store humidity. |
Definition at line 106 of file MiniR4_DHT11.h.
|
inline |
Sets the delay between consecutive sensor readings.
By default, the delay is set to 250 milliseconds. This can be adjusted using this method.
delay | The delay in milliseconds between sensor readings. |
Definition at line 53 of file MiniR4_DHT11.h.
|
static |
Definition at line 41 of file MiniR4_DHT11.h.
|
static |
Definition at line 42 of file MiniR4_DHT11.h.
|
static |
Definition at line 44 of file MiniR4_DHT11.h.