Skip to content

Instantly share code, notes, and snippets.

@boxalljohn
Created July 15, 2013 11:13
Show Gist options
  • Select an option

  • Save boxalljohn/5999217 to your computer and use it in GitHub Desktop.

Select an option

Save boxalljohn/5999217 to your computer and use it in GitHub Desktop.
// 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