#define led 4
//#define led 3
unsigned long interval = 1000;
unsigned long previousMillis = 0;
unsigned long currentMillis = 0;
boolean ledState = 0;
/*-------------------------------------*/
void setup() {
pinMode(led, OUTPUT);
digitalWrite(led,ledState);

}

void loop() {
 currentMillis = millis(); 

if((currentMillis - previousMillis)>= interval){
  ledState = !ledState;
  digitalWrite(led,ledState);
  previousMillis=millis();
}
};