More by the author:. Mellis, Limor Fried, and Tom Igoe. Simple Multi-tasking in Arduino covers all the other necessary steps. For Arduino Uno, Mega etc, an unsigned long has 32bit and can range from 0 to 4,,, When the time has move on by mS or more, then delayRunning is set to false to prevent the code in the if statement being executed again and the led turned off.
nest...