Hello! First off, thank you very much for this series of articles, it's very helpful and nicely written.
I think I've found a small bug in the button_pressed task: it seems like the modification to the delay value is not saved in the local variable, and subsequent presses on the button don't decrease the value further (pressing the button always set the delay to 1500ms)
I've added the following line right after adjusting the delay value:
*ctx.local.delayval = delay;
and it seems like it fixes the problem.
Thank you once again for this series