fixed led not blinking

on first run the led would not blink, due to elif instead of if
This commit is contained in:
Hendrik Rauh 2024-12-18 19:46:08 +01:00
parent 9a7303b5d4
commit 7af1725665

View file

@ -74,7 +74,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
} }
else if (ms == 0) if (ms == 0)
{ {
timerAlarmDisable(timer); timerAlarmDisable(timer);
analogWrite(PIN_LED, brightness_led); analogWrite(PIN_LED, brightness_led);