EXP_3

mail@pastecode.io avatar
unknown
plain_text
a year ago
7.8 kB
3
Indexable
Never
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
}

void loop() {

//Pattern 01
digitalWrite(0, LOW); 
delay(300);
digitalWrite(1, LOW); 
delay(300);
digitalWrite(2, LOW); 
delay(300);
digitalWrite(3, LOW); 
delay(300);
digitalWrite(5, LOW); 
delay(300);
digitalWrite(6, LOW); 
delay(300);
digitalWrite(7, LOW); 
delay(300);
digitalWrite(8, LOW); 
delay(300);
  
digitalWrite(0, HIGH); 
delay(200);
digitalWrite(1, HIGH); 
delay(200);
digitalWrite(2, HIGH); 
delay(200);
digitalWrite(3, HIGH); 
delay(200);
digitalWrite(5, HIGH); 
delay(200);
digitalWrite(6, HIGH); 
delay(200);
digitalWrite(7, HIGH); 
delay(200);
digitalWrite(8, HIGH); 
delay(200);

//Pattern 02
digitalWrite(8, LOW); 
delay(300);
digitalWrite(7, LOW); 
delay(300);
digitalWrite(6, LOW); 
delay(300);
digitalWrite(5, LOW); 
delay(300);
digitalWrite(3, LOW); 
delay(300);
digitalWrite(2, LOW); 
delay(300);
digitalWrite(1, LOW); 
delay(300);
digitalWrite(0, LOW); 
delay(300);
  
  
digitalWrite(8, HIGH); 
delay(200);  
digitalWrite(7, HIGH); 
delay(200);
digitalWrite(6, HIGH); 
delay(200);
digitalWrite(5, HIGH); 
delay(200);
digitalWrite(3, HIGH); 
delay(200);
digitalWrite(2, HIGH); 
delay(200);
digitalWrite(1, HIGH); 
delay(200);
digitalWrite(0, HIGH); 
delay(200);

//Pattern 03
digitalWrite(8, HIGH);
digitalWrite(7, LOW); 
digitalWrite(6, HIGH); 
digitalWrite(5, LOW); 
digitalWrite(3, HIGH); 
digitalWrite(2, LOW); 
digitalWrite(1, HIGH); 
digitalWrite(0, LOW); 
delay(300);

digitalWrite(8, LOW); 
digitalWrite(7, HIGH); 
digitalWrite(6, LOW); 
digitalWrite(5, HIGH); 
digitalWrite(3, LOW); 
digitalWrite(2, HIGH); 
digitalWrite(1, LOW); 
digitalWrite(0, HIGH); 
delay(300); //Rep1

digitalWrite(8, HIGH);
digitalWrite(7, LOW); 
digitalWrite(6, HIGH); 
digitalWrite(5, LOW); 
digitalWrite(3, HIGH); 
digitalWrite(2, LOW); 
digitalWrite(1, HIGH); 
digitalWrite(0, LOW); 
delay(300);

digitalWrite(8, LOW); 
digitalWrite(7, HIGH); 
digitalWrite(6, LOW); 
digitalWrite(5, HIGH); 
digitalWrite(3, LOW); 
digitalWrite(2, HIGH); 
digitalWrite(1, LOW); 
digitalWrite(0, HIGH); 
delay(300); //Rep2

digitalWrite(8, HIGH);
digitalWrite(7, LOW); 
digitalWrite(6, HIGH); 
digitalWrite(5, LOW); 
digitalWrite(3, HIGH); 
digitalWrite(2, LOW); 
digitalWrite(1, HIGH); 
digitalWrite(0, LOW); 
delay(300);

digitalWrite(8, LOW);
digitalWrite(7, HIGH); 
digitalWrite(6, LOW); 
digitalWrite(5, HIGH); 
digitalWrite(3, LOW); 
digitalWrite(2, HIGH); 
digitalWrite(1, LOW); 
digitalWrite(0, HIGH); 
delay(300); //Rep3

digitalWrite(8, HIGH);
digitalWrite(7, LOW); 
digitalWrite(6, HIGH); 
digitalWrite(5, LOW); 
digitalWrite(3, HIGH); 
digitalWrite(2, LOW); 
digitalWrite(1, HIGH); 
digitalWrite(0, LOW); 
delay(300);

digitalWrite(8, LOW);
digitalWrite(7, HIGH); 
digitalWrite(6, LOW); 
digitalWrite(5, HIGH); 
digitalWrite(3, LOW); 
digitalWrite(2, HIGH); 
digitalWrite(1, LOW); 
digitalWrite(0, HIGH); 
delay(300); //Rep4

digitalWrite(8, HIGH);
digitalWrite(7, LOW); 
digitalWrite(6, HIGH); 
digitalWrite(5, LOW); 
digitalWrite(3, HIGH); 
digitalWrite(2, LOW); 
digitalWrite(1, HIGH); 
digitalWrite(0, LOW); 
delay(300);

digitalWrite(8, LOW);
digitalWrite(7, HIGH); 
digitalWrite(6, LOW); 
digitalWrite(5, HIGH); 
digitalWrite(3, LOW); 
digitalWrite(2, HIGH); 
digitalWrite(1, LOW); 
digitalWrite(0, HIGH); 
delay(300); //Rep5

digitalWrite(8, HIGH);
digitalWrite(7, LOW); 
digitalWrite(6, HIGH); 
digitalWrite(5, LOW); 
digitalWrite(3, HIGH); 
digitalWrite(2, LOW); 
digitalWrite(1, HIGH); 
digitalWrite(0, LOW); 
delay(300);

digitalWrite(8, LOW);
digitalWrite(7, HIGH); 
digitalWrite(6, LOW); 
digitalWrite(5, HIGH); 
digitalWrite(3, LOW); 
digitalWrite(2, HIGH); 
digitalWrite(1, LOW); 
digitalWrite(0, HIGH); 
delay(300); //Rep6

digitalWrite(8, HIGH);
digitalWrite(7, LOW); 
digitalWrite(6, HIGH); 
digitalWrite(5, LOW); 
digitalWrite(3, HIGH); 
digitalWrite(2, LOW); 
digitalWrite(1, HIGH); 
digitalWrite(0, LOW); 
delay(300);

digitalWrite(8, HIGH);
digitalWrite(7, HIGH); 
digitalWrite(6, LOW); 
digitalWrite(5, HIGH); 
digitalWrite(3, LOW); 
digitalWrite(2, HIGH); 
digitalWrite(1, LOW); 
digitalWrite(0, HIGH); 
delay(300); //Rep7

digitalWrite(8, HIGH);
digitalWrite(6, HIGH); 
digitalWrite(3, HIGH); 
digitalWrite(1, HIGH); 
delay(200);

//Pattern 04
digitalWrite(0, LOW); 
delay(300);
digitalWrite(1, LOW); 
delay(300);
digitalWrite(2, LOW); 
delay(300);
digitalWrite(3, LOW); 
delay(300);
digitalWrite(5, LOW); 
delay(300);
digitalWrite(6, LOW); 
delay(300);
digitalWrite(7, LOW); 
delay(300);
digitalWrite(8, LOW); 
delay(300);

digitalWrite(8, HIGH); 
delay(200);  
digitalWrite(7, HIGH); 
delay(200);
digitalWrite(6, HIGH); 
delay(200);
digitalWrite(5, HIGH); 
delay(200);
digitalWrite(3, HIGH); 
delay(200);
digitalWrite(2, HIGH); 
delay(200);
digitalWrite(1, HIGH); 
delay(200);
digitalWrite(0, HIGH); 
delay(200);

//Pattern 05
digitalWrite(8, LOW); 
delay(300);
digitalWrite(7, LOW); 
delay(300);
digitalWrite(6, LOW); 
delay(300);
digitalWrite(5, LOW); 
delay(300);
digitalWrite(3, LOW); 
delay(300);
digitalWrite(2, LOW); 
delay(300);
digitalWrite(1, LOW); 
delay(300);
digitalWrite(0, LOW); 
delay(300);
  
digitalWrite(0, HIGH); 
delay(200);
digitalWrite(1, HIGH); 
delay(200);
digitalWrite(2, HIGH); 
delay(200);
digitalWrite(3, HIGH); 
delay(200);
digitalWrite(5, HIGH); 
delay(200);
digitalWrite(6, HIGH); 
delay(200);
digitalWrite(7, HIGH); 
delay(200);
digitalWrite(8, HIGH); 
delay(200);

//INFLOW
digitalWrite(8, LOW); 
digitalWrite(7, LOW); 
digitalWrite(6, LOW); 
digitalWrite(5, LOW); 
digitalWrite(3, LOW); 
digitalWrite(2, LOW); 
digitalWrite(1, LOW); 
digitalWrite(0, LOW); 


digitalWrite(8, HIGH); 
digitalWrite(0, HIGH); 
delay(200);
digitalWrite(7, HIGH); 
digitalWrite(1, HIGH); 
delay(200);
digitalWrite(6, HIGH); 
digitalWrite(2, HIGH); 
delay(200);
digitalWrite(5, HIGH); 
digitalWrite(3, HIGH); 
delay(200);

//OUTFLOW
digitalWrite(5, LOW); 
digitalWrite(3, LOW); 
delay(300);
digitalWrite(6, LOW); 
digitalWrite(2, LOW); 
delay(300);
digitalWrite(7, LOW); 
digitalWrite(1, LOW); 
delay(300);
digitalWrite(8, LOW); 
digitalWrite(0, LOW); 
delay(300);


//BLINKING
digitalWrite(8, LOW); 
digitalWrite(7, LOW); 
digitalWrite(6, LOW); 
digitalWrite(5, LOW); 
digitalWrite(3, LOW); 
digitalWrite(2, LOW); 
digitalWrite(1, LOW); 
digitalWrite(0, LOW); 
delay(200);

digitalWrite(8, HIGH); 
digitalWrite(7, HIGH); 
digitalWrite(6, HIGH); 
digitalWrite(5, HIGH); 
digitalWrite(3, HIGH); 
digitalWrite(2, HIGH); 
digitalWrite(1, HIGH); 
digitalWrite(0, HIGH);
delay(200);//rep1

digitalWrite(8, LOW); 
digitalWrite(7, LOW); 
digitalWrite(6, LOW); 
digitalWrite(5, LOW); 
digitalWrite(3, LOW); 
digitalWrite(2, LOW); 
digitalWrite(1, LOW); 
digitalWrite(0, LOW); 
delay(200);

digitalWrite(8, HIGH); 
digitalWrite(7, HIGH); 
digitalWrite(6, HIGH); 
digitalWrite(5, HIGH); 
digitalWrite(3, HIGH); 
digitalWrite(2, HIGH); 
digitalWrite(1, HIGH); 
digitalWrite(0, HIGH);
delay(200);//rep2

digitalWrite(8, LOW); 
digitalWrite(7, LOW); 
digitalWrite(6, LOW); 
digitalWrite(5, LOW); 
digitalWrite(3, LOW); 
digitalWrite(2, LOW); 
digitalWrite(1, LOW); 
digitalWrite(0, LOW); 
delay(200);

digitalWrite(8, HIGH); 
digitalWrite(7, HIGH); 
digitalWrite(6, HIGH); 
digitalWrite(5, HIGH); 
digitalWrite(3, HIGH); 
digitalWrite(2, HIGH); 
digitalWrite(1, HIGH); 
digitalWrite(0, HIGH);
delay(200);//rep 3
}