Example-code for timing based on millis()
BlinkWithoutDelay
Arduino Multiple Things
Several Things at a Time