int button1 = 16;
int led1 = 14;
int input1;
int StatusAkhir = LOW;
void setup() {
pinMode (led1, OUTPUT);
pinMode(button1, INPUT_PULLUP);
}
void loop() {
// baca button
int input1 = digitalRead(button1);
if (input1 == LOW && StatusAkhir == LOW) {
delay(100);
digitalWrite(led1, HIGH);
StatusAkhir = HIGH;
}
else if (input1 == LOW && StatusAkhir == HIGH) {
delay(100);
digitalWrite(led1, LOW);
StatusAkhir = LOW;
}
}