int Led=2;
int pushbutton=7;
void setup() {
// put your setup code here, to run once:
pinMode(Led, OUTPUT);
pinMode(pushbutton, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int pushbuttonstate=digitalRead(pushbutton);
if (pushbuttonstate == LOW) {
digitalWrite(Led, HIGH);
delay(5000);
}else{
digitalWrite(Led, LOW);
}
}