const int ledPin =13;
const int buttonPin=4;
int buttonState;
void setup()
{
// put your setup code here, to run once:
pinMode(ledPin,OUTPUT);
pinMode(buttonPin,INPUT);
}
void loop()
{
// put your main code here, to run repeatedly:
buttonState = digitalRead(buttonPin);
if(buttonState == LOW)
{
digitalWrite(ledPin,HIGH);
delay(5000);
digitalWrite(ledPin,LOW);
delay(5000);
}
else
digitalWrite(ledPin, LOW);
}