Multitasking with two switches and three relays

Thanks, though I found this more useful for my purposes : Using millis() for timing. A beginners guide