Merge branch 'master' of https://hjkgitunix.dedyn.io/hans-jurgen/Wetterstation_Boris
This commit is contained in:
commit
18628d6738
|
@ -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);
|
||||
|
|
|
@ -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}
|
||||
|
|
13
src/main.cpp
13
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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user