int button = 7;
int nilaibutton;
int led = 8;
void setup() {
// put your setup code here, to run once:
pinMode(button,INPUT);
pinMode(led, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
nilaibutton = digitalRead(button);
if (nilaibutton == LOW) {
digitalWrite(led, HIGH);
}else{
digitalWrite(led,LOW);
}
}