2024-09-2800

This commit is contained in:
hans-jurgen 2024-09-28 22:01:53 +02:00
parent c255826199
commit 13f9f2318c
3 changed files with 6 additions and 7 deletions

View File

@ -36,7 +36,7 @@ void init_MCP9808(){
F_MCP9808 = false; F_MCP9808 = false;
} }
Serial.println("Found MCP9808!"); //Serial.println("Found MCP9808!");
tempsensor.setResolution(3); // sets the resolution mode of reading, the modes are defined in the table bellow: tempsensor.setResolution(3); // sets the resolution mode of reading, the modes are defined in the table bellow:
// Mode Resolution SampleTime // Mode Resolution SampleTime
// 0 0.5°C 30 ms // 0 0.5°C 30 ms

View File

@ -20,6 +20,6 @@ float getBattery(float kor = 1.000)
valA0= valA0 / 1024; valA0= valA0 / 1024;
valA0 = valA0 * kor; valA0 = valA0 * kor;
dtostrf(valA0,7,2,floatString); dtostrf(valA0,7,2,floatString);
Serial.printf("Batterie:\t\t %s V\n", floatString); Serial.printf("Batterie:\t\t%s V\n", floatString);
return valA0; return valA0;
} }

View File

@ -28,7 +28,6 @@ PubSubClient client(espClient);
//#include <mess_BMP280.h> //#include <mess_BMP280.h>
#include <mess_BME280.h> #include <mess_BME280.h>
//#include <mess_Ub.h>
#include <mess_Ub_old.h> #include <mess_Ub_old.h>
#include <messADS1115.h> #include <messADS1115.h>
@ -102,8 +101,8 @@ void setup() {
#endif #endif
if (!F_ADS1115 == true){ if (!F_ADS1115 == true){
AKKU = getBattery(korectur); // ca. 170 ms AKKU = getBattery(korectur); // ca. 170 ms
Serial.println("ALTE UB MESSUNG:"); /* Serial.print("ALTE UB MESSUNG:\t\t");
Serial.println(AKKU); Serial.print(AKKU); Serial.println(" V"); */
} }
else{ else{
MessungADS(); MessungADS();
@ -240,7 +239,7 @@ void setup_wifi() {
endTime = millis(); endTime = millis();
unsigned long Pause = stoerung -((endTime - startTime) * 1000); // Pause unsigned long Pause = stoerung -((endTime - startTime) * 1000); // Pause
Serial.println(); Serial.println();
Serial.println("STÖRUNG WiFi."); Serial.print("STÖRUNG WiFi!!!\t");
Serial.print("Ich gehe für ca. "); Serial.print(Pause/1000/1000/60); Serial.println( " Minuten schlafen."); Serial.print("Ich gehe für ca. "); Serial.print(Pause/1000/1000/60); Serial.println( " Minuten schlafen.");
ESP.deepSleep(Pause, WAKE_NO_RFCAL); // Pause ESP.deepSleep(Pause, WAKE_NO_RFCAL); // Pause
delay(100); delay(100);
@ -292,7 +291,7 @@ void reconnect() {
Serial.println(" try again in 5 seconds"); Serial.println(" try again in 5 seconds");
// Wait 5 seconds before retrying // Wait 5 seconds before retrying
delay(5000); delay(5000);
ESP.restart(); //
} }
} }
} }