From 7af17256656de154b36d89a11302a05adff815ba 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 e713c8d..40b1153 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -74,7 +74,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);