Created
March 18, 2015 23:01
-
-
Save BrettMayson/f13dfb5ead60d3ff0413 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 left = 3; | |
int right = 4; | |
int m = 5; | |
int tl = 6; | |
int t = 7; | |
int tr = 8; | |
int bl = 9; | |
int b = 10; | |
int br = 11; | |
void setup(){ | |
pinMode(left,OUTPUT); | |
pinMode(right,OUTPUT); | |
pinMode(m,OUTPUT); | |
pinMode(tl,OUTPUT); | |
pinMode(t,OUTPUT); | |
pinMode(tr,OUTPUT); | |
pinMode(bl,OUTPUT); | |
pinMode(b,OUTPUT); | |
pinMode(br,OUTPUT); | |
} | |
void clean(){ | |
digitalWrite(left,HIGH); | |
digitalWrite(right,HIGH); | |
digitalWrite(tl,LOW); | |
digitalWrite(t,LOW); | |
digitalWrite(tr,LOW); | |
digitalWrite(m,LOW); | |
digitalWrite(bl,LOW); | |
digitalWrite(b,LOW); | |
digitalWrite(br,LOW); | |
} | |
void leftDisp(){ | |
digitalWrite(right,HIGH); | |
digitalWrite(left,LOW); | |
} | |
void rightDisp(){ | |
digitalWrite(left,HIGH); | |
digitalWrite(right,LOW); | |
} | |
void one(){ | |
digitalWrite(br,HIGH); | |
digitalWrite(tr,HIGH); | |
} | |
void loop(){ | |
clean(); | |
one(); | |
leftDisp(); | |
delay(5); | |
clean(); | |
one(); | |
rightDisp(); | |
delay(5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment