Änderung der Wifieinstellungen.
This commit is contained in:
parent
40850f2019
commit
32cbd01875
|
@ -12,10 +12,10 @@
|
|||
platform = espressif32
|
||||
board = nodemcu-32s
|
||||
framework = arduino
|
||||
monitor_port = COM4
|
||||
monitor_port = /dev/ttyUSB0
|
||||
monitor_speed = 115200
|
||||
monitor_filters = time
|
||||
upload_port = COM4
|
||||
upload_port = /dev/ttyUSB0
|
||||
|
||||
build_flags =
|
||||
-DNoDEBUG
|
||||
|
|
47
src/main.cpp
47
src/main.cpp
|
@ -105,12 +105,19 @@ u_int16_t StartderAbdunklung = 20;
|
|||
u_int16_t EndederAbdunklung = 7;
|
||||
|
||||
// Wifi
|
||||
char ssid[] = "St.-Peters-Gasse"; // your network SSID (name)
|
||||
/* char ssid[] = "St.-Peters-Gasse"; // your network SSID (name)
|
||||
char pass[] = "1952994784599317"; // your network password
|
||||
IPAddress ip( 192, 168, 127, 252);
|
||||
IPAddress gateway( 192, 168, 127, 1 );
|
||||
IPAddress subnet( 255, 255, 255, 0 );
|
||||
IPAddress dns(192, 168, 127, 1); // DNS-Server
|
||||
IPAddress dns(192, 168, 127, 1); // DNS-Server */
|
||||
char ssid[] = "EasyBox-838169";
|
||||
char pass[] = "RcZmua6Xv4R4V5Kf";
|
||||
IPAddress ip( 192, 168, 2, 80);
|
||||
IPAddress gateway( 192, 168, 2, 1 );
|
||||
IPAddress subnet( 255, 255, 255, 0 );
|
||||
IPAddress dns(192, 168, 2, 1); // DNS-Server */
|
||||
|
||||
String hostname = "DISPLAY";
|
||||
int status = WL_IDLE_STATUS;
|
||||
const char* NTP_SERVER = "de.pool.ntp.org";
|
||||
|
@ -375,22 +382,22 @@ void ZeigeZeit(tm localTime, int xPos = 2, int yPos = 8)
|
|||
sprintf(szTime, "%02d", localTime.tm_hour);
|
||||
display.setCursor(xPos-1, yPos);
|
||||
display.setFont(&FreeMonoBold12pt7b);
|
||||
display.setTextColor(myMAGENTA);
|
||||
display.setTextColor(myWHITE);
|
||||
display.fillRect(xPos, yPos - 8, 27, 15, myBLACK);
|
||||
display.print(szTime);
|
||||
display.setFont();
|
||||
// Doppelpunkt zeichnen
|
||||
display.fillRect(xPos + 27, yPos -8, 2, 15, myBLACK);
|
||||
if (blinkSek == true) {
|
||||
display.fillRect(xPos + 27, yPos - 3, 2, 2, myMAGENTA);
|
||||
display.fillRect(xPos + 27, yPos + 1, 2, 2, myMAGENTA);
|
||||
display.fillRect(xPos + 27, yPos - 3, 2, 2, myWHITE);
|
||||
display.fillRect(xPos + 27, yPos + 1, 2, 2, myWHITE);
|
||||
}
|
||||
/* display.fillRect(xPos + 27, yPos - 3, 2, 2, myMAGENTA);
|
||||
display.fillRect(xPos + 27, yPos + 1, 2, 2, myMAGENTA); */
|
||||
sprintf(szTime, "%02d", localTime.tm_min);
|
||||
display.setCursor(xPos + 29, yPos);
|
||||
display.setFont(&FreeMonoBold12pt7b);
|
||||
display.setTextColor(myMAGENTA);
|
||||
display.setTextColor(myWHITE);
|
||||
display.fillRect(xPos + 29, yPos - 8, 27, 15, myBLACK);
|
||||
display.print(szTime);
|
||||
display.setFont();
|
||||
|
@ -407,7 +414,7 @@ void ZeigeTestTime(tm localTime)
|
|||
}
|
||||
display.setFont(&FreeMonoBold9pt7b);
|
||||
display.setCursor(6, 11);
|
||||
display.setTextColor(myMAGENTA);
|
||||
display.setTextColor(myWHITE);
|
||||
display.fillRect(0, 0, 64, 12, myBLACK);
|
||||
display.print(szTime);
|
||||
display.setFont(0);
|
||||
|
@ -644,8 +651,8 @@ void ZeigeLuftdruck(float Pressure){
|
|||
}
|
||||
void BlinkSec(bool blink){
|
||||
if (blink) {
|
||||
display.fillRect(32, 4, 2, 2, myMAGENTA);
|
||||
display.fillRect(32, 10, 2, 2, myMAGENTA);
|
||||
display.fillRect(32, 4, 2, 2, myWHITE);
|
||||
display.fillRect(32, 10, 2, 2, myWHITE);
|
||||
|
||||
}else{
|
||||
display.fillRect(32, 0, 2, 12, myBLACK);
|
||||
|
@ -964,7 +971,7 @@ void loop() {
|
|||
}else{
|
||||
readHtuFlag = true;
|
||||
}
|
||||
if ((timeinfo.tm_hour >= StartderAbdunklung) && timeinfo.tm_hour < EndederAbdunklung)
|
||||
if ((timeinfo.tm_hour >= StartderAbdunklung) || (timeinfo.tm_hour < EndederAbdunklung))
|
||||
{
|
||||
display.setBrightness(dunkel);
|
||||
#ifdef HELLIGKEIT
|
||||
|
@ -976,7 +983,7 @@ void loop() {
|
|||
}
|
||||
switch (timeinfo.tm_sec)
|
||||
{
|
||||
case 0 ... 29:
|
||||
case 0 ... 14:
|
||||
{
|
||||
//ZeigeInnenTemp(TemparaturInnen);
|
||||
ZeigeTemperatur(TemparaturInnen, myGREEN);
|
||||
|
@ -984,7 +991,23 @@ void loop() {
|
|||
ZeigeInnenCO(CO2Wert);
|
||||
break;
|
||||
}
|
||||
case 30 ... 59:
|
||||
case 15 ... 29:
|
||||
{
|
||||
//ZeigeAussenTemp(Aussentemp);
|
||||
ZeigeTemperatur(Aussentemp, myBLUE);
|
||||
ZeigeAussenFeuchtigkeit(Luftfeuchtigkeit);
|
||||
ZeigeLuftdruck(Pressure);
|
||||
break;
|
||||
}
|
||||
case 30 ... 44:
|
||||
{
|
||||
//ZeigeInnenTemp(TemparaturInnen);
|
||||
ZeigeTemperatur(TemparaturInnen, myGREEN);
|
||||
ZeigeInnenFeuchtigkeit(FeuchteInnen);
|
||||
ZeigeInnenCO(CO2Wert);
|
||||
break;
|
||||
}
|
||||
case 45 ... 59:
|
||||
{
|
||||
//ZeigeAussenTemp(Aussentemp);
|
||||
ZeigeTemperatur(Aussentemp, myBLUE);
|
||||
|
|
Loading…
Reference in New Issue
Block a user