Created
July 15, 2013 11:13
-
-
Save boxalljohn/5999217 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example 1.1 - using the 'for' command | |
| void setup() | |
| { | |
| pinMode(9, OUTPUT); // initialise the digital pin 9 as an output | |
| } | |
| void loop() | |
| { | |
| for (int wow = 1; wow <= 5; wow++) | |
| { | |
| digitalWrite(9, HIGH); // turn on digital pin 9 | |
| delay(1000); // wait a moment | |
| digitalWrite(9, LOW); // turn off digital pin 9 | |
| delay(1000); // wait a moment | |
| } | |
| delay(10000); // wait 10 seconds, then the whole thing will start again | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment