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
This commit is contained in:
1 parent
2c62e70390
commit
34e0561f46
5 files changed
+182
-60
No files matched your search
@@ -1,20 +1,25 @@
|
||||
#ifndef SENSOR_H
|
||||
#define SENSOR_H
|
||||
#ifndef SHT31_H
|
||||
#define SHT31_H
|
||||
#include <esp_err.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// Function to initialize the sensor
|
||||
void initSensor(void);
|
||||
esp_err_t sht31_init(void);
|
||||
|
||||
// Function to get the current humidity level
|
||||
// Returns the humidity as a percentage (0-100)
|
||||
float getHumidity(void);
|
||||
float sht31_get_humidity(void);
|
||||
|
||||
// Function to get the current temperature
|
||||
// Returns the temperature in degrees Celsius
|
||||
float getTemperature(void);
|
||||
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
|
||||
}
|
||||
Reference in new issue
Block a user