2024-01-29

This commit is contained in:
hans-jurgen 2024-01-30 15:06:10 +01:00
parent bea0adfbed
commit bf78533397
2 changed files with 21 additions and 8 deletions

View File

@ -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

View File

@ -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];