mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-19 10:32:56 +00:00
fixed and changed the reset protection
This commit is contained in:
parent
6e828b2e8e
commit
2126a70d69
2 changed files with 4 additions and 2 deletions
|
@ -86,7 +86,7 @@ All print files (STL, STEP, X_T) can be found in [assets/case](/assets/case/). A
|
|||
|
||||
## ⚙️ Default config
|
||||
|
||||
To reset the settings, hold down the button and connect the ESP to the power supply, the LED will flash quickly. After 5 seconds the LED should start flashing slowly and the settings are reset. If you release the button early you abort the reset.
|
||||
To reset the settings, hold down the button and connect the ESP to the power supply, the LED will flash quickly. After 3 seconds the LED should light up static and the settings are reset. If you release the button early you abort the reset and the LED flashes slowly.
|
||||
|
||||
| Setting | Value |
|
||||
| -------------- | ------------------ |
|
||||
|
|
|
@ -107,15 +107,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue