+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.
11 lines
272 B
C
11 lines
272 B
C
#ifndef __MGOS_PROMETHEUS_SENSORS_H
|
|
#define __MGOS_PROMETHEUS_SENSORS_H
|
|
|
|
#include "mgos.h"
|
|
#include "mgos_gpio.h"
|
|
|
|
float mgos_prometheus_sensors_dht_get_temp(uint8_t idx);
|
|
float mgos_prometheus_sensors_dht_get_humidity(uint8_t idx);
|
|
|
|
#endif // __MGOS_PROMETHEUS_SENSORS_H
|