diff --git a/platformio.ini b/platformio.ini index cb2fbf3..db656c3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,9 +13,9 @@ platform = espressif32 board = nodemcu-32s framework = arduino monitor_speed = 115200 -monitor_port = COM4 +monitor_port = COM3 monitor_filters = time -upload_port = COM4 +upload_port = COM3 lib_deps = knolleary/PubSubClient @ 2.8 adafruit/Adafruit GFX Library @ 1.11.3 @@ -29,7 +29,7 @@ build_flags = [env:debug] ; Entwicklungssystem build_flags = ${env.build_flags} -DDEBUG=1 - -DGRENZWERT=3.70 + -DGRENZWERT=3.60 -DSTASSID=\"MagentaWLAN-RGDO\" -DSTAPSK=\"93329248424922704583\" -DGATEWAY=\"192.168.127.1\" diff --git a/src/main.cpp b/src/main.cpp index 2fd6490..7d995e5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -100,7 +100,7 @@ IPAddress gateway; IPAddress subnet; IPAddress dns; // DNS-Server IPAddress secondarDNS; -String hostname = "GROSSZEICHBORIS"; +String hostname = "GROSSZEICHENDISPLAY"; int status = WL_IDLE_STATUS; const char* NTP_SERVER = "de.pool.ntp.org"; const char* TZ_INFO = "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00"; // enter your time zone (https://remotemonitoringsystems.ca/time-zone-abbreviations.php) @@ -519,7 +519,7 @@ void setup() { // Set the time in microseconds that we pause after selecting each mux channel // (May help if some rows are missing / the mux chip is too slow) - display.setMuxDelay(1,1,1,1,1); + display.setMuxDelay(0,0,0,0,0); // Set the number of panels that make up the display area width (default is 1) //display.setPanelsWidth(2); @@ -741,9 +741,9 @@ static void setup_wifi() { void loop() { getNTPtime(10); - /* if (!client.connected()) { + if (!client.connected()) { reconnect(); - } */ + } client.loop(); //writeLinie(); @@ -790,13 +790,13 @@ void loop() { //Serial.println("START"); if (Aussentemp > -99.9){ char szWetter[10]; - dtostrf(TempFlur, 4, 1, szWetter); + //dtostrf(TempFlur, 4, 1, szWetter); //Serial.print(Aussentemp); Serial.print(" "); Serial.println(szWetter); - scroll_Grad(matrix_height-8,30," Flur: " + String(szWetter), 64,64,64, true); + //scroll_Grad(matrix_height-8,30," Flur: " + String(szWetter), 64,64,64, true); /* Achtung sehr wichtig, wenn das gesamt Laufschrift mehr als 30 Sekunden Dauert muss ein .... */ - client.loop(); + //client.loop(); /* eingeführt werden, sonst kommt es zu einen Socket Fehler !!!! */ scroll_text(matrix_height-8,30,"Luftdruck: " + String(Pressure) + " hPa", 255,255,255, true); @@ -817,10 +817,15 @@ void loop() { einen Socket Fehler !!!! */ dtostrf(Luftfeuchtigkeit, 4, 1, szWetter); scroll_text(matrix_height-8,30,"Luftfeuchtigkeit: " + String(szWetter) + " %", 64,64,64, true); + } if ((Akku <= GRENZWERT) && (Akku > 0)){ + client.loop(); scroll_text(matrix_height-8,40,"Akku: " + String(Akku) + " Volt", 255, 0, 0, true); scroll_text(matrix_height-8,40,"Akku aufladen!", 255, 0, 0, true); + } else{ + client.loop(); + scroll_text(matrix_height-8,30,"Akku: " + String(Akku) + " Volt", 0, 64, 0, true); } //Serial.println("STOP"); }