Theory: Using millis() and interrupts for multitasking. - Robodemy