Last active
December 19, 2015 22:58
-
-
Save Stringbeanwu/6030839 to your computer and use it in GitHub Desktop.
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
int led1 = 1; | |
int led2 = 2; | |
int led3=3 ; | |
int led4=4; | |
int led5=5; | |
int led6=6; | |
int led7=7; | |
int led8=8; | |
int led9=9; | |
int led10=10; | |
int led11=11; | |
int led12=12; | |
// the setup routine runs once when you press reset: | |
void setup() { | |
// initialize the digital pin as an output. | |
pinMode(led1, OUTPUT); | |
pinMode(led2, OUTPUT); | |
pinMode(led3, OUTPUT); | |
pinMode(led4, OUTPUT); | |
pinMode(led5, OUTPUT); | |
pinMode(led6, OUTPUT); | |
pinMode(led7, OUTPUT); | |
pinMode(led8, OUTPUT); | |
pinMode(led9, OUTPUT); | |
pinMode(led10, OUTPUT); | |
pinMode(led11, OUTPUT); | |
pinMode(led12,OUTPUT); | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
//BELOW IS MY EXPERIMENTAL SECTION WHERE I CHANGE THE VALUES OF EACH PIN ONE BY ONE IN ORDER TO TROUBLESHOOT | |
// digitalWrite(led1,LOW); | |
// digitalWrite(led2,LOW); | |
// digitalWrite(led3,LOW); | |
// digitalWrite(led4,LOW); | |
// digitalWrite(led5,LOW); | |
// digitalWrite(led6,LOW); | |
// digitalWrite(led7,LOW); | |
// digitalWrite(led8,LOW); | |
// digitalWrite(led9,LOW); | |
// digitalWrite(led10,LOW); | |
// digitalWrite(led11,LOW); | |
// digitalWrite(led12,LOW); | |
//BELOW IS THE CODE FOR AN ALTERNATING PATTERN. THIS PATTERN WAS SHOWN IN MY VIDEOS. | |
digitalWrite(led1,HIGH); | |
digitalWrite(led2,LOW); | |
digitalWrite(led3,LOW); | |
digitalWrite(led4,LOW); | |
digitalWrite(led5,HIGH); | |
digitalWrite(led6,LOW); | |
digitalWrite(led7,LOW); | |
digitalWrite(led8,LOW); | |
digitalWrite(led9,HIGH); | |
digitalWrite(led10,LOW); | |
digitalWrite(led11,LOW); | |
digitalWrite(led12,LOW); | |
delay(500); | |
digitalWrite(led1, LOW); | |
digitalWrite(led2,HIGH); | |
digitalWrite(led5,LOW); | |
digitalWrite(led6,HIGH); | |
digitalWrite(led8,LOW); | |
digitalWrite(led9,LOW); | |
digitalWrite(led10,HIGH); | |
digitalWrite(led11,LOW); | |
digitalWrite(led12,LOW); | |
delay(500); | |
digitalWrite(led2,LOW); | |
digitalWrite(led3,HIGH); | |
digitalWrite(led5,LOW); | |
digitalWrite(led6,LOW); | |
digitalWrite(led7,HIGH); | |
digitalWrite(led8,LOW); | |
digitalWrite(led9,LOW); | |
digitalWrite(led10,LOW); | |
digitalWrite(led11,HIGH); | |
digitalWrite(led12,LOW); | |
delay(500); | |
digitalWrite(led2,LOW); | |
digitalWrite(led3,LOW); | |
digitalWrite(led4,HIGH); | |
digitalWrite(led5,LOW); | |
digitalWrite(led6,LOW); | |
digitalWrite(led7,LOW); | |
digitalWrite(led8,HIGH); | |
digitalWrite(led11,LOW); | |
digitalWrite(led12,HIGH); | |
delay(500); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment