From 9f2baac7facccb078d09e2547cc6ecd592cfda77 Mon Sep 17 00:00:00 2001 From: pgp Date: Mon, 29 Nov 2021 15:19:44 +0100 Subject: [PATCH 1/2] ajout de commentaires --- include/main.h | 2 +- src/main.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/main.h b/include/main.h index 389155c..e2622b4 100644 --- a/include/main.h +++ b/include/main.h @@ -23,7 +23,7 @@ #define SENSORS_NUMBER 5 #define DHT22 22 #define TIME_TO_SLEEP 598 -#define US_TO_S_FACTOR 1000000 +#define US_TO_S_FACTOR 1000000 //1000000 => 1 mesure par 10 min #define R2 100 #define R3 10 #define VOLTAGE_OUT(Vin) (((Vin)*R3) / (R2 + R3)) diff --git a/src/main.cpp b/src/main.cpp index f61bafc..c6527dd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,6 @@ -// mdps dans include/secret.h +// psswd's into include/secret.h +// others settings in main.h + #include "main.h" using namespace std; From a0f058150ea8fd65d29717ba2fb3ecc3a550ee88 Mon Sep 17 00:00:00 2001 From: pgp Date: Mon, 29 Nov 2021 15:58:48 +0100 Subject: [PATCH 2/2] passwd variable names update --- include/secret.h | 2 +- src/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/secret.h b/include/secret.h index 0043c73..2b13ed7 100644 --- a/include/secret.h +++ b/include/secret.h @@ -1,5 +1,5 @@ #define MQTT_USER "capteurs" #define MQTT_MDP "Fablab" #define SSID "Thermo-Bibli" -#define MQTT_PWD "12453801" +#define SSID_PWD "12453801" diff --git a/src/main.cpp b/src/main.cpp index c6527dd..bc10c8a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,7 +49,7 @@ void reconnect(void) while (!MqttClient.connected()) { Serial.print("."); - if (MqttClient.connect(ESPNAME, MQTT_USER, MQTT_PWD)) + if (MqttClient.connect(ESPNAME, MQTT_USER, MQTT_MDP)) { Serial.println("Connected."); } @@ -134,7 +134,7 @@ void writeMessage(char *txt, float *temp, float *hum, int number) void setup() { Serial.begin(9600); - setupWIFI(SSID, MQTT_PWD); + setupWIFI(SSID, SSID_PWD); setupMQTT(MQTT_ADDRESS, MQTT_PORT); initSensors(sensors, SENSORS_NUMBER); TimeClient.begin();