Last active
March 15, 2017 21:07
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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