Created
February 4, 2015 20:11
-
-
Save geerlingguy/36ee876c7d67cd84efb9 to your computer and use it in GitHub Desktop.
Blinky
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
/* | |
Blinky | |
Make it look like my Arduino is doing something nefarious. | |
*/ | |
int led = 13; | |
void setup() { | |
pinMode(led, OUTPUT); | |
} | |
void loop() { | |
// Create a couple random delays. | |
int on_delay = random(1, 250); | |
int off_delay = random(1, 100); | |
digitalWrite(led, HIGH); | |
delay(on_delay); | |
digitalWrite(led, LOW); | |
delay(off_delay); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment