In my code, alarm() is called once, which activates the previously defined Task blinkAlarm, calling the function alarmSub() every blinkDelay. I want this alarmSub() function to run for a limited time, duration, and then end. currently, I set up another function, alarmEnd(), which is called using timer.in(duration, alarmEnd), but this seems unnecessarily complicated to me. My setup might be more of an edge-case though..
In my code,
alarm()
is called once, which activates the previously defined TaskblinkAlarm
, calling the functionalarmSub()
everyblinkDelay
. I want thisalarmSub()
function to run for a limited time,duration
, and then end. currently, I set up another function,alarmEnd()
, which is called usingtimer.in(duration, alarmEnd)
, but this seems unnecessarily complicated to me. My setup might be more of an edge-case though..Here's my full code