Sorry if this is a double post but I think the network dropped the first one.

concering:if (millis() >= nextTime) ....

Well, I've already shown that if nextTime = 0xffffffff then the > condition cannot possibly be met because 0xffffffff is the largest unsigned long value. That means you have to satisfy the = condition. The only way you can guarantee that is to have millis() return exactly 0xffffffff. And the only way that can be guaranteed is if you make the check at least slightly more often than once/millisecond. Right? otherwise you might skip right over 0xffffffff and have to wait, what? 9.5 hours for another chance? Right?

A delay(1) - the minimum value -- elsewhere will take 1 millisecond and that would be long enough so that you can't check the condition more often than once/ms. therefore you can't be certain you'll ever meet the = condition. Longer delays would make it even more unlikely.

// check to see if it's time to blink the LED; that is, is the difference // between the current time and last time we blinked the LED bigger than // the interval at which we want to blink the LED. intervalA = analogRead(potA); intervalB = analogRead(potB); lightvalA = analogRead(ldrA); lightvalB = analogRead(ldrB);