void setup() {
// put your setup code here, to run once:
pinmode(2, OUTPUT);
pinmode(3, OUTPUT);
pinmode(4, OUTPUT);
pinmode(5, OUTPUT);
pinmode(6, OUTPUT);
pinmode(7, OUTPUT);
pinmode(8, OUTPUT);
pinmode(9, OUTPUT);
pinmode(10, OUTPUT);
pinmode(11, OUTPUT);
pinmode(12, OUTPUT);
pinmode(13, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
jalan_satu();
jalan_dua();
jalan_tiga();
jalan_empat ();
}
void jalan_satu() {
digitalwrite(4,HIGH);
delay(2000);
digitalwrite(4, LOW);
digitalwrite(2, HIGH);
delay(2000);
digitalwrite(2, LOW);
digitalarite(3, HIGH);
delay(2000);
digitalwrite(3, LOW);
digitalwrite(4, HIGH);
}
void jalan_dua() {
digitalwrite(7, HIGH);
delay(2000);
digitalwrite(7, LOW);
digitalwrita(5, HIGH);
delay(2000);
digitalwrite(5, LOW);
digitalwrite(6, HIGH);
delay(2000);
digitalwrite(5, LOW);
digitalwrire(6, HiGH);
delay(2000);
digitalwrite(6, LOW);
digitalwrite(7, HIGH);
}
void jalan_tiga(){
digitalwrite(10, HIGH);
delay(2000);
digitalwrite(10, LOW);
digitalwrite(8, HIGH);
delay(2000);
digitalwrite(8, LOW):
digitalwrite(9, HIGH):
delay(2000);
digitalwrite(9,LOW);
digitalwrite(10,HIGH);
}
void jalan_empat(){
digitalwrite(13, HIGH);
delay(2000);
digitalwrite(13, LOW);
digitalwrite(11, HIGH);
delay(2000);
digitalwrite(11, LOW);
digitalwrite(12, HIGH);
delay(2000);
digitalwrite(12, LOW);
digitalwrite(13, HIGH);
}