Files
dc-sensor/firmware/main/include/sht31.h
T
Sven Luethi 1341a1000a modified: main/include/sht31.h
modified:   main/src/main.c
modified:   main/src/sht31.c
Fix floating point issue with Sensor readouts
2024-08-11 11:20:15 +02:00

28 lines
518 B
C

#ifndef SHT31_H
#define SHT31_H
#include <esp_err.h>
#ifdef __cplusplus
extern "C" {
#endif
// Function to initialize the sensor
esp_err_t sht31_init(void);
// Function to get the current humidity level
// Returns the humidity as a percentage (0-100)
float sht31_get_humidity(void);
// Function to get the current temperature
// Returns the temperature in degrees Celsius
float sht31_get_temperature(void);
esp_err_t sht31_read_temp_hum(float *temperature, float *humidity);
#ifdef __cplusplus
}
#endif
#endif