Hi and welcome to this friendly forum!
Just a few thoughts and hints to get you on the right track:
Dvr1: is a subroutine. Never loop nor wait in a sub. You need to shift all the logig back into the main loop.
To do so, it is a good idea to use flags, indicating the state or mode youre in.
I.e. Set the leds in dvr1, and set a flag "dvr1-active", then return. In the main loop, check tis flag and do something if it is set.
Breakfast is ready, more soon
↧