f43dea1d7b595e930327873c85d8bbb801cd05f5
+float mgos_prometheus_sensors_dht_get_temp(uint8_t idx); +float mgos_prometheus_sensors_dht_get_humidity(uint8_t idx); They return NAN if the index is invalid, or the sensor couldn't be found. Otherwise, they return the last measured temperature or humidity values as floats.
Prometheus Sensors
This is a library that implements a set of sensor types, reading their values
periodically and exposing them to Prometheus using the prometheus-metrics
library.
Supported Sensors
DHT
This is using dht
library; each sensor reading takes approximately 32ms (28ms
if there is no sensor on the GPIO in). They are placed on timers so as to
minimize pre-emption of the main application. DHT sensors are polled in order
based on sensors.dht_gpio
pins and with a period of sensors.dht_period
which defaults to 3 seconds.
Description
Languages
C
100%