Skip to content

Instantly share code, notes, and snippets.

@garethfoote
Last active January 26, 2018 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garethfoote/0b05616cad938312419992925324ba09 to your computer and use it in GitHub Desktop.
Save garethfoote/0b05616cad938312419992925324ba09 to your computer and use it in GitHub Desktop.
// Make variables for the led pin number and delay
// These can be used throughout your code
int ledPin = 13;
int delayMs = 1000;
void setup() {
// Tell pin 13 to work as an output
pinMode( ledPin, OUTPUT );
}
void loop() {
// Set pin 13 to HIGH voltage (5v) and delay
digitalWrite( ledPin, HIGH );
delay( delayMs );
// Set pin 13 to LOW voltage (0v) and delay
digitalWrite( ledPin, LOW );
delay( delayMs );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment