Hardware Reference
In-Depth Information
The delay(1000); function is another function that is provided by the standard Ardu-
ino library and this pauses the program for 1000 msec (there are a 1000 msec in a second).
The digitalWrite(led, LOW); function then writes a 0 to the output pin, which
should turn the LED off. The delay(1000); function pauses the program again. The
1000 in the parentheses is an excellent example of an argument that you pass to a func-
tion. In this case, each time you call the delay() function you send it a number that tells
it how long to pause. This loop() function will be called continually, so this should turn
the LED on and off. Upload this code as you did the last time, and you will now see the
orange LED flash on and off.
Search WWH ::




Custom Search