diff --git a/Wecker/Alarm.ino b/Wecker/Alarm.ino index 02ea1a8..d814dd8 100644 --- a/Wecker/Alarm.ino +++ b/Wecker/Alarm.ino @@ -125,7 +125,7 @@ void set_alarm1(){ void set_alarm2(){ - Clock.setA2Time(0, al2h, al2m, 100, true, false, false); + Clock.setA2Time(0, al2h, al2m, 0b1000000, true, false, false); //Clock.turnOnAlarm(1); byte A1Day, A1Hour, A1Minute, AlarmBits; bool A1Dy, A1h12, A1PM; diff --git a/Wecker/Uhr.ino b/Wecker/Uhr.ino index 9c642b7..3bfcb9d 100644 --- a/Wecker/Uhr.ino +++ b/Wecker/Uhr.ino @@ -239,8 +239,8 @@ void add_minute(int i){ void add_month(int i){ M = M + i; - if (m > 12){ - m = 1; + if (M > 12){ + M = 1; } } diff --git a/Wecker/Wecker.ino b/Wecker/Wecker.ino index a780ec2..b8169fb 100644 --- a/Wecker/Wecker.ino +++ b/Wecker/Wecker.ino @@ -62,6 +62,8 @@ void setup() { delay(400); display_text("Uhr"); + WiFi.hostname(NodeName); + //WiFi.mode(WIFI_OFF); //WiFiManager intialisation. Once completed there is no need to repeat the process on the current board WiFiManager wifiManager; wifiManager.autoConnect(); @@ -118,7 +120,8 @@ void setup() { //------------------------------------------------- //OTA // No authentication by default - ArduinoOTA.setPassword((const char *)"ota-password"); + ArduinoOTA.setPassword(NodeName.c_str()); + ArduinoOTA.setHostname(NodeName.c_str()); ArduinoOTA.onStart([]() { Serial.println("Start");