const int led=5;
const int tombol=2;
int statusTombol;
boolean statusLed=false;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(tombol, INPUT);
}
void loop() {
// put your main code here, to run repeatdly:
statusTombol=digitalRead(tombol);
if(statusTombol==LOW){
statusLed=!statusLed;
delay(100);
}
digitalWrite(led, statusLed);
}