fixed and changed the reset protection

This commit is contained in:
Hendrik Rauh 2024-12-14 23:50:57 +01:00 committed by RaffaelW
parent 6aff101f2e
commit 66cf008e19
2 changed files with 4 additions and 2 deletions

View file

@ -112,15 +112,17 @@ void setup()
{
ledBlink(100);
unsigned long startTime = millis();
while (digitalRead(PIN_BUTTON) == LOW && (millis() - startTime >= 5000))
while (digitalRead(PIN_BUTTON) == LOW && (millis() - startTime <= 3000))
{
}
if (digitalRead(PIN_BUTTON) == LOW)
{
ledBlink(1);
Serial.println("Reset config");
config.begin("dmx", false);
config.clear();
config.end();
delay(2000);
}
}