you need to structure your program so the void loop always runs… else you stop the running of the entire processor by putting it to sleep…
so for example you want the void loop to check and see what is going on… handle timing and executing sub routines
in the very simplest think of it as a interupt… so the void loop wonders if it needs to do anything… if it does it does… else it does nothing… by doing things i mean executing funtions (sub routines)