Low-level GPIO peripheral driver interface definitions.
#define ETIMEDOUT
Connection timed out.
dht_type_t
Device type of the DHT device.
int dht_read(dht_t *dev, int16_t *temp, int16_t *hum)
get a new temperature and/or humidity value from the device
int dht_init(dht_t *dev, const dht_params_t *params)
Initialize a new DHT device.
@ DHT11_2022
New DHT11 variant with 0.01 °C resolution.
@ DHT21
DHT21 device identifier.
@ DHT22
DHT22 device identifier.
@ DHT11
Older DHT11 variants with either 1 °C or 0.1 °C resolution.
@ AM2301
AM2301 device identifier.
@ DHT_NOCSUM
checksum error
@ DHT_TIMEOUT
communication timed out
gpio_mode_t
Available pin modes.
Data type for storing DHT sensor readings.
uint16_t humidity
relative humidity in deci-percent
uint16_t temperature
temperature in deci-Celsius
Configuration parameters for DHT devices.
gpio_mode_t in_mode
input pin configuration, with or without pull resistor
gpio_t pin
GPIO pin of the device's data pin.
dht_type_t type
type of the DHT device
Device descriptor for DHT sensor devices.
dht_params_t params
Device parameters.
dht_data_t last_val
Values of the last measurement.