mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-05 13:48:53 +00:00
parent
b3e29cb7b4
commit
cd138e5b71
1 changed files with 13 additions and 7 deletions
20
src/main.cpp
20
src/main.cpp
|
@ -100,21 +100,27 @@ void setup()
|
|||
|
||||
// LED
|
||||
analogWrite(PIN_LED, brightness_led);
|
||||
// delay(5000);
|
||||
ledBlink(500);
|
||||
|
||||
// Button
|
||||
pinMode(PIN_BUTTON, INPUT_PULLUP);
|
||||
if (digitalRead(PIN_BUTTON) == LOW)
|
||||
{
|
||||
ledBlink(100);
|
||||
delay(2000);
|
||||
Serial.println("Reset config");
|
||||
config.begin("dmx", false);
|
||||
config.clear();
|
||||
config.end();
|
||||
unsigned long startTime = millis();
|
||||
while (digitalRead(PIN_BUTTON) == LOW && (millis() - startTime >= 5000))
|
||||
{
|
||||
}
|
||||
if (digitalRead(PIN_BUTTON) == LOW)
|
||||
{
|
||||
Serial.println("Reset config");
|
||||
config.begin("dmx", false);
|
||||
config.clear();
|
||||
config.end();
|
||||
}
|
||||
}
|
||||
|
||||
ledBlink(500);
|
||||
|
||||
// wait for serial monitor
|
||||
delay(5000);
|
||||
Serial.println("Starting DMX-Interface...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue