int dht_read(dht_t *dev, int16_t *temp, int16_t *hum)
get a new temperature and humidity value from the device
@ DHT22
DHT22 device identifier.
uint32_t last_read_us
Time of the last measurement.
uint16_t humidity
relative deca-humidity
dht_type_t
Device type of the DHT device.
@ DHT21
DHT21 device identifier.
Device descriptor for DHT sensor devices.
int dht_init(dht_t *dev, const dht_params_t *params)
Initialize a new DHT device.
dht_params_t params
Device parameters.
@ DHT_NODEV
device type not defined
dht_data_t last_val
Values of the last measurement.
@ DHT_TIMEOUT
communication timed out
@ DHT_NOCSUM
checksum error
dht_type_t type
type of the DHT device
uint16_t temperature
temperature in deca-Celsius
Low-level GPIO peripheral driver interface definitions.
@ DHT11
DHT11 device identifier.
Data type for storing DHT sensor readings.
gpio_mode_t
Available pin modes.
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.