int btn = 13;
int led1 = 27;
int led2 = 14;
int led3 =12;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Haay.Bang.Billyyy");
pinMode(13, INPUT);
pinMode(27, OUTPUT);
digitalWrite(27, LOW);
pinMode(14, OUTPUT);
digitalWrite(14, LOW);
pinMode(12,OUTPUT);
digitalWrite(12, LOW);
delay(10);
}
void loop() {
// ATAS KE BAWAH
int status = digitalRead(13);
if (status == HIGH){
pinMode(27, OUTPUT);
digitalWrite(27, HIGH);
delay(100);
digitalWrite(27, LOW);
delay(100);
pinMode(14, OUTPUT);
digitalWrite(14, HIGH);
delay(100);
digitalWrite(14, LOW);
delay(100);
pinMode(12,OUTPUT);
digitalWrite(12, HIGH);
delay(100);
digitalWrite(12, LOW);
delay(100);
// BAWAH KE ATAS
pinMode(12, OUTPUT);
digitalWrite(12, HIGH);
delay(100);
digitalWrite(12, LOW);
delay(100);
pinMode(14, OUTPUT);
digitalWrite(14, HIGH);
delay(100);
digitalWrite(14, LOW);
delay(100);
pinMode(27,OUTPUT);
digitalWrite(27, HIGH);
delay(100);
digitalWrite(27, LOW);
delay(100);
// NYALA BARENG
pinMode(27, OUTPUT);
digitalWrite(27, HIGH);
delay(100);
pinMode(14, OUTPUT);
digitalWrite(14, HIGH);
delay(100);
pinMode(12,OUTPUT);
digitalWrite(12, HIGH);
delay(100);
digitalWrite(27, LOW);
delay(100);
digitalWrite(14, LOW);
delay(100);
digitalWrite(12, LOW);
delay(100);
// NYALA BARENG
pinMode(27, OUTPUT);
digitalWrite(27, HIGH);
delay(100);
pinMode(14, OUTPUT);
digitalWrite(14, HIGH);
delay(100);
pinMode(12,OUTPUT);
digitalWrite(12, HIGH);
delay(100);
digitalWrite(27, LOW);
delay(100);
digitalWrite(14, LOW);
delay(100);
digitalWrite(12, LOW);
delay(100);
// NYALA BARENG
pinMode(27, OUTPUT);
digitalWrite(27, HIGH);
delay(100);
pinMode(14, OUTPUT);
digitalWrite(14, HIGH);
delay(100);
pinMode(12,OUTPUT);
digitalWrite(12, HIGH);
delay(100);
digitalWrite(27, LOW);
delay(100);
digitalWrite(14, LOW);
delay(100);
digitalWrite(12, LOW);
delay(100);}
// Serial.println(digitalRead(13));
// Serial.println(digitalRead(27));
// Serial.println(digitalRead(14));
// Serial.println(digitalRead(12));
}