Skip to content

Instantly share code, notes, and snippets.

@viktorstrate
Last active March 15, 2017 21:07
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 viktorstrate/9e191468ae3a07ecece3caae81f81a88 to your computer and use it in GitHub Desktop.
Save viktorstrate/9e191468ae3a07ecece3caae81f81a88 to your computer and use it in GitHub Desktop.
Blinks the pattern from the song "YYZ" by Rush. Using the built in LED on an arduino
/*
Name: rushdurino
Description: Blinks the pattern from the song "YYZ" by Rush
*/
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
// Y
dash();
dot();
dash();
dash();
// Y
dash();
dot();
dash();
dash();
// Z
dash();
dash();
dot();
dot();
}
void dot(){
digitalWrite(led, HIGH);
delay(400);
digitalWrite(led, LOW);
delay(80);
}
void dash(){
digitalWrite(led, HIGH);
delay(120);
digitalWrite(led, LOW);
delay(80);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment