R1c4rd:
for (; millis() < startTime + 2000UL;)
[...]
for (; millis() < startTime + 7000UL;)
Change this to:
for (millis() - startTime < 2000UL)
[...]
for (millis() - startTime < 7000UL)
This way overflows are handled transparently (thanks to this being unsigned integers). Your code may get stuck after about 49 days, when millis() overflows.