Skip to content

Instantly share code, notes, and snippets.

@chrismetcalf
Created October 24, 2016 06:31
Show Gist options
  • Save chrismetcalf/e15f6654f77e5f0a1b7c1d331d2c9ece to your computer and use it in GitHub Desktop.
Save chrismetcalf/e15f6654f77e5f0a1b7c1d331d2c9ece to your computer and use it in GitHub Desktop.
int ALL_BULBS = 13;
int N = 12;
int U = 11;
int R = 10;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(ALL_BULBS, OUTPUT);
pinMode(N, OUTPUT);
pinMode(U, OUTPUT);
pinMode(R, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(ALL_BULBS, HIGH); // turn all bulbs off
digitalWrite(R, LOW); // turn the green "R" bulb off
digitalWrite(U, LOW); // turn the white "U" bulb off
digitalWrite(N, LOW); // turn the orange "N" bulb off
delay(3000); // wait for three seconds
digitalWrite(R, HIGH); // turn the green "R" bulb on
delay(1000); // wait for a second
digitalWrite(R, LOW); // turn the green "R" bulb off
delay(1000); // wait for a second
digitalWrite(U, HIGH); // turn the white "U" bulb on
delay(1000); // wait for a second
digitalWrite(U, LOW); // turn the white "U" bulb off
delay(1000); // wait for a second
digitalWrite(N, HIGH); // turn the orange "N" bulb on
delay(1000); // wait for a second
digitalWrite(N, LOW); // turn the orange "N" bulb off
delay(1000); // wait for a second
digitalWrite(ALL_BULBS, LOW); // turn all bulbs on
digitalWrite(R, HIGH); // turn the green "R" bulb on
digitalWrite(U, HIGH); // turn the white "U" bulb on
digitalWrite(N, HIGH); // turn the orange "N" bulb on
delay(500);
digitalWrite(ALL_BULBS, HIGH); // turn all bulbs off
digitalWrite(R, LOW); // turn the green "R" bulb off
digitalWrite(U, LOW); // turn the white "U" bulb off
digitalWrite(N, LOW); // turn the orange "N" bulb off
delay(200); // wait for three seconds
digitalWrite(ALL_BULBS, LOW); // turn all bulbs on
digitalWrite(R, HIGH); // turn the green "R" bulb on
digitalWrite(U, HIGH); // turn the white "U" bulb on
digitalWrite(N, HIGH); // turn the orange "N" bulb on
delay(200);
digitalWrite(ALL_BULBS, HIGH); // turn all bulbs off
digitalWrite(R, LOW); // turn the green "R" bulb off
digitalWrite(U, LOW); // turn the white "U" bulb off
digitalWrite(N, LOW); // turn the orange "N" bulb off
delay(600); // wait for three seconds
digitalWrite(ALL_BULBS, LOW); // turn all bulbs on
digitalWrite(R, HIGH); // turn the green "R" bulb on
digitalWrite(U, HIGH); // turn the white "U" bulb on
digitalWrite(N, HIGH); // turn the orange "N" bulb on
delay(20000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment