Compare commits
No commits in common. "master" and "main" have entirely different histories.
|
@ -29,7 +29,7 @@ build_flags =
|
||||||
[env:debug] ; Entwicklungssystem
|
[env:debug] ; Entwicklungssystem
|
||||||
build_flags = ${env.build_flags}
|
build_flags = ${env.build_flags}
|
||||||
-DDEBUG=1
|
-DDEBUG=1
|
||||||
-DGRENZWERT=3.70
|
-DGRENZWERT=3.60
|
||||||
-DSTASSID=\"MagentaWLAN-RGDO\"
|
-DSTASSID=\"MagentaWLAN-RGDO\"
|
||||||
-DSTAPSK=\"93329248424922704583\"
|
-DSTAPSK=\"93329248424922704583\"
|
||||||
-DGATEWAY=\"192.168.127.1\"
|
-DGATEWAY=\"192.168.127.1\"
|
||||||
|
|
35
src/main.cpp
35
src/main.cpp
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
// This is how many color levels the display shows - the more the slower the update
|
// This is how many color levels the display shows - the more the slower the update
|
||||||
|
@ -99,7 +100,7 @@ IPAddress gateway;
|
||||||
IPAddress subnet;
|
IPAddress subnet;
|
||||||
IPAddress dns; // DNS-Server
|
IPAddress dns; // DNS-Server
|
||||||
IPAddress secondarDNS;
|
IPAddress secondarDNS;
|
||||||
String hostname = "GROSSZEICHBORIS";
|
String hostname = "GROSSZEICHENDISPLAY";
|
||||||
int status = WL_IDLE_STATUS;
|
int status = WL_IDLE_STATUS;
|
||||||
const char* NTP_SERVER = "de.pool.ntp.org";
|
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)
|
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)
|
||||||
|
@ -161,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);
|
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);
|
bool getNTPtime(int sec);
|
||||||
void showTime(tm localTime);
|
void showTime(tm localTime);
|
||||||
|
void writeLinie();
|
||||||
static uint32_t lastTime = 0; // millis() memory
|
static uint32_t lastTime = 0; // millis() memory
|
||||||
static void setup_wifi();
|
static void setup_wifi();
|
||||||
|
|
||||||
|
@ -469,6 +471,17 @@ void Test()
|
||||||
display.setFont();
|
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() {
|
void setup() {
|
||||||
startTime = millis();
|
startTime = millis();
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
@ -485,7 +498,7 @@ void setup() {
|
||||||
// Define multiplex implemention here {BINARY, STRAIGHT} (default is BINARY)
|
// Define multiplex implemention here {BINARY, STRAIGHT} (default is BINARY)
|
||||||
display.setMuxPattern(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);
|
display.setScanPattern(LINE);
|
||||||
|
|
||||||
|
|
||||||
|
@ -506,7 +519,7 @@ void setup() {
|
||||||
|
|
||||||
// Set the time in microseconds that we pause after selecting each mux channel
|
// 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)
|
// (May help if some rows are missing / the mux chip is too slow)
|
||||||
//display.setMuxDelay(0,1,0,0,0);
|
display.setMuxDelay(0,0,0,0,0);
|
||||||
|
|
||||||
// Set the number of panels that make up the display area width (default is 1)
|
// Set the number of panels that make up the display area width (default is 1)
|
||||||
//display.setPanelsWidth(2);
|
//display.setPanelsWidth(2);
|
||||||
|
@ -732,6 +745,7 @@ void loop() {
|
||||||
reconnect();
|
reconnect();
|
||||||
}
|
}
|
||||||
client.loop();
|
client.loop();
|
||||||
|
//writeLinie();
|
||||||
|
|
||||||
if (millis() - lastTime >= 1000)
|
if (millis() - lastTime >= 1000)
|
||||||
{
|
{
|
||||||
|
@ -740,7 +754,7 @@ void loop() {
|
||||||
ZeigeDatum(timeinfo, 1, 1);
|
ZeigeDatum(timeinfo, 1, 1);
|
||||||
ZeigeZeit(timeinfo, TimeX, TimeY);
|
ZeigeZeit(timeinfo, TimeX, TimeY);
|
||||||
//ZeigeZeit(timeinfo, 1,40);
|
//ZeigeZeit(timeinfo, 1,40);
|
||||||
ZeigeCO(1,CoY);
|
//ZeigeCO(1,CoY);
|
||||||
/* if ((timeinfo.tm_min % 10) == 0){
|
/* if ((timeinfo.tm_min % 10) == 0){
|
||||||
/* if (Covid19 != 0){
|
/* if (Covid19 != 0){
|
||||||
scroll_text(matrix_height-8,20,"Landkreis Heilbronn", 30,30,30, true);
|
scroll_text(matrix_height-8,20,"Landkreis Heilbronn", 30,30,30, true);
|
||||||
|
@ -772,17 +786,17 @@ void loop() {
|
||||||
scroll_text2(matrix_height-24,20,"ich w\201nsche Euch allen ein", 128,128,0, true);
|
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); */
|
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");
|
//Serial.println("START");
|
||||||
if (Aussentemp > -99.9){
|
if (Aussentemp > -99.9){
|
||||||
char szWetter[10];
|
char szWetter[10];
|
||||||
dtostrf(TempFlur, 4, 1, szWetter);
|
//dtostrf(TempFlur, 4, 1, szWetter);
|
||||||
//Serial.print(Aussentemp); Serial.print(" "); Serial.println(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,
|
/* Achtung sehr wichtig,
|
||||||
wenn das gesamt Laufschrift mehr
|
wenn das gesamt Laufschrift mehr
|
||||||
als 30 Sekunden Dauert muss ein .... */
|
als 30 Sekunden Dauert muss ein .... */
|
||||||
client.loop();
|
//client.loop();
|
||||||
/* eingeführt werden, sonst kommt es zu
|
/* eingeführt werden, sonst kommt es zu
|
||||||
einen Socket Fehler !!!! */
|
einen Socket Fehler !!!! */
|
||||||
scroll_text(matrix_height-8,30,"Luftdruck: " + String(Pressure) + " hPa", 255,255,255, true);
|
scroll_text(matrix_height-8,30,"Luftdruck: " + String(Pressure) + " hPa", 255,255,255, true);
|
||||||
|
@ -803,10 +817,15 @@ void loop() {
|
||||||
einen Socket Fehler !!!! */
|
einen Socket Fehler !!!! */
|
||||||
dtostrf(Luftfeuchtigkeit, 4, 1, szWetter);
|
dtostrf(Luftfeuchtigkeit, 4, 1, szWetter);
|
||||||
scroll_text(matrix_height-8,30,"Luftfeuchtigkeit: " + String(szWetter) + " %", 64,64,64, true);
|
scroll_text(matrix_height-8,30,"Luftfeuchtigkeit: " + String(szWetter) + " %", 64,64,64, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((Akku <= GRENZWERT) && (Akku > 0)){
|
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: " + String(Akku) + " Volt", 255, 0, 0, true);
|
||||||
scroll_text(matrix_height-8,40,"Akku aufladen!", 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");
|
//Serial.println("STOP");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user