Something basic like this would work, flesh out the definitions, pin assignments, other stuff.Basically, you push the start button at 8:30.It reads the current value of millis, then sits in a loop reading millis and comparing to the initial read until 8.5 hrs have gone by for interval1.It then sets some flags and sits in the loop again until 15.5 hrs have gone by for interval2.Then it repeats.