while (millis() < 8000UL)
Depending on when this code gets called, this may, or may not, be a good idea. Typically, you want to test the current time minus some previous time (when calibration started, for instance) against the interval, not just the current time.