#define plb 19
#define plm 18
#define plk 5
#define ppb 15
int nilai = 0;
void setup()
{
pinMode(plb, OUTPUT);
pinMode(plm, OUTPUT);
pinMode(plk, OUTPUT);
pinMode(ppb, INPUT);
}
void loop() {
if(digitalRead(ppb) == HIGH) {
delay(500);
digitalWrite(plb, HIGH);
delay(500);
digitalWrite(plb, LOW);
delay(500);
digitalWrite(plm, HIGH);
delay(500);
digitalWrite(plm, LOW);
delay(500);
digitalWrite(plk, HIGH);
delay(500);
digitalWrite(plk, LOW);
}
else{
digitalWrite(plb, LOW);
digitalWrite(plm, LOW);
digitalWrite(plk, LOW);
}
}