Skip to content

Instantly share code, notes, and snippets.

@gskielian
Created October 20, 2015 22:36
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 gskielian/951b05fd28ddd6424e5d to your computer and use it in GitHub Desktop.
Save gskielian/951b05fd28ddd6424e5d to your computer and use it in GitHub Desktop.
led Code from Rock GServe event
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
you connect the leds to
pin 13 and gnd
connect another to
pin 3, pin 4
This example code is in the public domain.
*/
int led13 = 13;
int led3 = 3;
int led4 = 4;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led13, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
digitalWrite(led4,LOW);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led3, HIGH);
delay(1000); // wait for a second
digitalWrite(led13, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led3, LOW);
delay(1000); // wait for a second
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment