From bf7853339730d10fd0a35b482ab8549481947032 Mon Sep 17 00:00:00 2001 From: hans-jurgen Date: Tue, 30 Jan 2024 15:06:10 +0100 Subject: [PATCH] 2024-01-29 --- platformio.ini | 4 ++-- src/main.cpp | 25 +++++++++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/platformio.ini b/platformio.ini index 027d9b5..cb2fbf3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,9 +13,9 @@ platform = espressif32 board = nodemcu-32s framework = arduino monitor_speed = 115200 -monitor_port = COM1 +monitor_port = COM4 monitor_filters = time -upload_port = COM2 +upload_port = COM4 lib_deps = knolleary/PubSubClient @ 2.8 adafruit/Adafruit GFX Library @ 1.11.3 diff --git a/src/main.cpp b/src/main.cpp index cf26944..2fd6490 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -162,6 +162,7 @@ void scroll_text2(uint8_t ypos, unsigned long scroll_delay, String text, uint8_t void scroll_Grad(uint8_t ypos, unsigned long scroll_delay, String text, uint8_t colorR, uint8_t colorG, uint8_t colorB, boolean blink); bool getNTPtime(int sec); void showTime(tm localTime); +void writeLinie(); static uint32_t lastTime = 0; // millis() memory static void setup_wifi(); @@ -470,6 +471,17 @@ void Test() display.setFont(); } +void writeLinie() +{ + for (int i=0; i <= 63; i++){ + display.fillRect(0, i, 60, 1, (myGREEN)); + Serial.println(i); + delay(1000); + display.fillRect(1, i, 60, 1, (myBLACK)); + } +} + + void setup() { startTime = millis(); Serial.begin(115200); @@ -486,7 +498,7 @@ void setup() { // Define multiplex implemention here {BINARY, STRAIGHT} (default is BINARY) display.setMuxPattern(BINARY); - // Set the multiplex pattern {LINE, ZIGZAG,ZZAGG, ZAGGIZ, WZAGZIG, VZAG, ZAGZIG} (default is LINE) + // Set the multiplex pattern {LINE, ZIGZAG,ZZAGG, ZZAGG, WZAGZIG, VZAG, ZAGZIG} (default is LINE) display.setScanPattern(LINE); @@ -507,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(0,1,0,0,0); + display.setMuxDelay(1,1,1,1,1); // Set the number of panels that make up the display area width (default is 1) //display.setPanelsWidth(2); @@ -729,10 +741,11 @@ static void setup_wifi() { void loop() { getNTPtime(10); - if (!client.connected()) { + /* if (!client.connected()) { reconnect(); - } + } */ client.loop(); + //writeLinie(); if (millis() - lastTime >= 1000) { @@ -741,7 +754,7 @@ void loop() { ZeigeDatum(timeinfo, 1, 1); ZeigeZeit(timeinfo, TimeX, TimeY); //ZeigeZeit(timeinfo, 1,40); - ZeigeCO(1,CoY); + //ZeigeCO(1,CoY); /* if ((timeinfo.tm_min % 10) == 0){ /* if (Covid19 != 0){ scroll_text(matrix_height-8,20,"Landkreis Heilbronn", 30,30,30, true); @@ -773,7 +786,7 @@ void loop() { scroll_text2(matrix_height-24,20,"ich w\201nsche Euch allen ein", 128,128,0, true); scroll_text2(matrix_height-24,20,"Frohes neues Jahr 2022.", 128,255,0, true); */ - ZeigeWetter(double(TempWohn), WetterY,WetterX); + //ZeigeWetter(double(TempWohn), WetterY,WetterX); //Serial.println("START"); if (Aussentemp > -99.9){ char szWetter[10];