Files
dc-sensor/firmware/main/include/sht31.h
T
Sven Luethi 34e0561f46 renamed: main/include/sensor.h -> main/include/sht31.h
modified:   main/src/main.c
deleted:    main/src/sensor.c
new file:   main/src/sht31.c
modified:   sdkconfig
2024-08-10 12:27:57 +02:00

29 lines
586 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);
esp_err_t sht31_read_temp_hum_int(int *temperature, int *humidity);
#ifdef __cplusplus
}
#endif
#endif