From 7ad8af28bdaeb514f03714e62aba401bb48e5f75 Mon Sep 17 00:00:00 2001 From: Hendrik Rauh <114620133+HendrikRauh@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:46:08 +0100 Subject: [PATCH] fixed led not blinking on first run the led would not blink, due to elif instead of if --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c3dbf11..3f587a0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -75,7 +75,7 @@ void ledBlink(int ms) timer = timerBegin(0, 80, true); // timer 0, prescalar: 80, UP counting timerAttachInterrupt(timer, &onTimer, true); // Attach interrupt } - else if (ms == 0) + if (ms == 0) { timerAlarmDisable(timer); analogWrite(PIN_LED, brightness_led);