Using the MsTimer class library, we can now modify the "blink" sketch as follows:
b
The "delay" in the setup function ensures that the millisecond timer value does not produce a 0 from the call to "millis". If the timer is started with a value of 0, it will appear that the timer has completed even before it is started. But in the loop, we take advantage of this notion by testing the initial timer which will be "done" before ever being started. That gets the LED blinking started. Then we begin the one second timer that occurs before the LED changes to its alternate state.