modified: main/src/main.c modified: main/src/sht31.c Fix floating point issue with Sensor readouts
28 lines
518 B
C
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
|