Add LocalSave and SendLocalData

This commit is contained in:
Nicolas Schmauch 2024-06-21 10:38:52 +02:00
parent e9d30f5f30
commit 97346c1b06

View file

@ -22,13 +22,13 @@
#define CLUSTER "grappe3" #define CLUSTER "grappe3"
#define SENSORS_NUMBER 5 #define SENSORS_NUMBER 5
#define DHT22 22 #define DHT22 22
//comment for the test part this is the good frequency // comment for the test part this is the good frequency
#define TIME_TO_SLEEP 596 #define TIME_TO_SLEEP 596
//#define TIME_TO_SLEEP 28 // #define TIME_TO_SLEEP 28
#define US_TO_S_FACTOR 1000000 #define US_TO_S_FACTOR 1000000
#define R2 100 #define R2 100
#define R3 10 #define R3 10
#define VOLTAGE_OUT(Vin) (((Vin)*R3) / (R2 + R3)) #define VOLTAGE_OUT(Vin) (((Vin) * R3) / (R2 + R3))
#define VOLTAGE_MAX 4200 #define VOLTAGE_MAX 4200
#define VOLTAGE_MIN 3300 #define VOLTAGE_MIN 3300
#define ADC_REFERENCE 1100 #define ADC_REFERENCE 1100
@ -39,7 +39,7 @@
#define ADC_PIN 35 #define ADC_PIN 35
#define CONV_FACTOR 1.78 #define CONV_FACTOR 1.78
#define READS 20 #define READS 20
const long gmtOffset_sec = 3600; const long gmtOffset_sec = 3600;
int getAverageChargeLevel(); int getAverageChargeLevel();
void setupMQTT(const char *address, int port); void setupMQTT(const char *address, int port);
@ -54,16 +54,15 @@ std::tuple<int, int, int> getDate();
/** /**
* @brief hgfhdjskl * @brief hgfhdjskl
* *
* @param txt testetest * @param txt testetest
* @param temp dqsdzfs * @param temp dqsdzfs
* @param hum * @param hum
* @param number vdsvsvsvs * @param number vdsvsvsvs
*/ */
void writeMsg(char *txt, float *temp, float *hum, int number); void writeMsg(char *txt, float *temp, float *hum, int number);
//timeClient.getEpochTime().toCharArray(date, 50); = convertir un string en char // timeClient.getEpochTime().toCharArray(date, 50); = convertir un string en char
/* /*
For test the esp32 signal emission without server Working/fixed/updated : For test the esp32 signal emission without server Working/fixed/updated :