mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-19 10:32:56 +00:00
parent
330d4ffa42
commit
0583b1c4e5
1 changed files with 3 additions and 8 deletions
11
src/main.cpp
11
src/main.cpp
|
@ -73,12 +73,7 @@ void ledBlink(int ms)
|
||||||
timer = timerBegin(0, 80, true); // timer 0, prescalar: 80, UP counting
|
timer = timerBegin(0, 80, true); // timer 0, prescalar: 80, UP counting
|
||||||
timerAttachInterrupt(timer, &onTimer, true); // Attach interrupt
|
timerAttachInterrupt(timer, &onTimer, true); // Attach interrupt
|
||||||
}
|
}
|
||||||
if (ms == 0)
|
else if (ms == 0)
|
||||||
{
|
|
||||||
timerAlarmDisable(timer);
|
|
||||||
analogWrite(PIN_LED, 0);
|
|
||||||
}
|
|
||||||
else if (ms == 1)
|
|
||||||
{
|
{
|
||||||
timerAlarmDisable(timer);
|
timerAlarmDisable(timer);
|
||||||
analogWrite(PIN_LED, brightness_led);
|
analogWrite(PIN_LED, brightness_led);
|
||||||
|
@ -112,7 +107,7 @@ void setup()
|
||||||
}
|
}
|
||||||
if (digitalRead(PIN_BUTTON) == LOW)
|
if (digitalRead(PIN_BUTTON) == LOW)
|
||||||
{
|
{
|
||||||
ledBlink(1);
|
ledBlink(0);
|
||||||
Serial.println("Reset config");
|
Serial.println("Reset config");
|
||||||
config.begin("dmx", false);
|
config.begin("dmx", false);
|
||||||
config.clear();
|
config.clear();
|
||||||
|
@ -325,7 +320,7 @@ void setup()
|
||||||
server.begin();
|
server.begin();
|
||||||
Serial.println("Server started!");
|
Serial.println("Server started!");
|
||||||
|
|
||||||
ledBlink(1);
|
ledBlink(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
|
|
Loading…
Add table
Reference in a new issue