int led1 = 2, led2 = 5, state=HIGH;

void setup() {                
  pinMode(led1, OUTPUT);    
  pinMode(led2, OUTPUT);
}

void loop() {
  digitalWrite(led1, state);  
  digitalWrite(led2, !state);  
  delay(1000);               
  state=!state;
}

