Created
December 30, 2015 19:00
-
-
Save protongt/703633bd53788fb3c3a1 to your computer and use it in GitHub Desktop.
Coding for LED strobe Light
This file contains 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
/* | |
Project Name : LED Strobe Light | |
Board : Cuteduino | |
Programmer : Eawan | |
9W2NFE.blogspot.com | |
~MechaMotion~ | |
*/ | |
// the setup routine runs once when you press reset: | |
void setup() { | |
// initialize the digital pin as an output. | |
pinMode(0, OUTPUT); //LED on Model B | |
pinMode(1, OUTPUT); //LED on Model A | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
digitalWrite(0, LOW); // turn the LED off (LOW is the voltage level) | |
digitalWrite(1, LOW); | |
delay(50); // wait for a half second | |
digitalWrite(0, HIGH); // turn the LED on by making the voltage HIGH | |
digitalWrite(1, LOW); | |
delay(50); | |
digitalWrite(0, LOW); | |
digitalWrite(1, LOW); | |
delay(50); | |
digitalWrite(0, HIGH); | |
digitalWrite(1, LOW); | |
delay(50); | |
digitalWrite(0, LOW); | |
digitalWrite(1, LOW); | |
delay(50); | |
digitalWrite(0, HIGH); | |
digitalWrite(1, LOW); | |
delay(50); | |
digitalWrite(0, LOW); | |
digitalWrite(1, HIGH); | |
delay(50); | |
digitalWrite(0, LOW); | |
digitalWrite(1, LOW); | |
delay(50); | |
digitalWrite(0, LOW); | |
digitalWrite(1, HIGH); | |
delay(50); | |
digitalWrite(0, LOW); | |
digitalWrite(1, LOW); | |
delay(50); | |
digitalWrite(0, LOW); | |
digitalWrite(1, HIGH); | |
delay(50); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment