This commit is contained in:
hans-jurgen 2024-10-10 14:42:33 +02:00
commit 18628d6738
3 changed files with 9 additions and 8 deletions

View File

@ -28,7 +28,7 @@ void init_HTU21(){
void read_HTU21D() {
float t = htu.readTemperature();
t = t + K_HTU;
t = t + KorrekturTemperatur;
dtostrf(t,7,1,htuData.temperature);
float h = htu.readHumidity();
dtostrf(h,7,1,htuData.humity);

View File

@ -96,7 +96,7 @@ build_flags = ${env.build_flags}
-DUBKorectur=0.854417949
-DMinimalSpannung=3.00
-DKorrekturLuftdruck=23.58
-DKorrekturTemperatur=0.0
-DKorrekturTemperatur=-3,5
[env:hjk]
build_flags = ${env.build_flags}

View File

@ -14,7 +14,7 @@
void reconnect();
void setup_wifi();
void verifyFingerprint();
//void verifyFingerprint();
void callback(char* topic1, byte* payload, unsigned int length);
void pulse_pin(uint8_t pin);
@ -49,9 +49,9 @@ IPAddress dns;
IPAddress secondaryDNS(8, 8, 8, 8);
//const char* mqtt_fprint = "a3:44:1d:aa:6e:e5:c7:55:02:20:98:ea:9b:df:1a:42:a2:f3:e3:0d";
const char* mqtt_user = "mqtt";
const char* mqtt_pass = "fische";
const char* mqtt_fprint = "a3:44:1d:aa:6e:e5:c7:55:02:20:98:ea:9b:df:1a:42:a2:f3:e3:0d";
const char* mqtt_user = "hjk";
const char* mqtt_pass = "51fische#";
const unsigned long interval = TINTERVAL * 60000000LU; // Minuten * Mikrosekunden für Sleep Mode
const unsigned long intervalLowBatt = TLOWBATT * 60000000LU; // Minuten * Mikrosekunden für Sleep Mode, Akku entladen
@ -80,7 +80,8 @@ void setup() {
digitalWrite(BUILTIN_LED, HIGH); */
Serial.begin(74880);
while ( !Serial ) delay(100); // wait for native usb
WiFi.mode( WIFI_OFF );
//WiFi.mode( WIFI_OFF );
WiFi.mode(WIFI_STA);
WiFi.forceSleepBegin();
Serial.println();
@ -292,7 +293,7 @@ void callback(char* topic1, byte* payload, unsigned int length)
void reconnect() {
// Loop until we're reconnected
sprintf(clientName, "%s%s", "ESP8266Wetter", sID);
sprintf(clientName, "%s%s", "WetterSensor", sID);
while (!client.connected()) {
Serial.print("Attempting MQTT connection...");
//verifyFingerprint();