void setup() {
  // put your setup code here, to run once:
pinMode(13,OUTPUT);
pinMode(22,INPUT);
}

void loop() 
{
  if (digitalRead(22)==HIGH)
  {
    digitalWrite(13,HIGH);
  delay(30); 
  digitalWrite(13,LOW);
  delay(300);  // put your main code here, to run repeatedly:
  }
  else(digitalWrite(13,HIGH));
  delay(300); 
  digitalWrite(13,LOW);
  delay(3000);  // put your main code here, to run repeatedly:
  }
