diff --git a/include/mess_htu21.h b/include/mess_htu21.h index b992914..c17c633 100644 --- a/include/mess_htu21.h +++ b/include/mess_htu21.h @@ -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); diff --git a/platformio.ini b/platformio.ini index a0ff16c..cab7890 100644 --- a/platformio.ini +++ b/platformio.ini @@ -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} diff --git a/src/main.cpp b/src/main.cpp index ac7cc9e..ed55e9b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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();