int led(12);
int out(11);
int led2(8);
int buzzer(3);
void setup() {
  Serial.begin(9600);
  pinMode(12, OUTPUT);
  pinMode(11, INPUT);
  pinMode(3, OUTPUT);
  pinMode(8, OUTPUT);
  // put your setup code here, to run once:

}

void loop() {
  int action = digitalRead(out);
  if (action == 1) {
    digitalWrite(led, HIGH);
    digitalWrite(buzzer, LOW);
    digitalWrite(led2, LOW);
    delay(1000);
  }
  else if (action == 0) {
    digitalWrite(led, LOW);
    digitalWrite(buzzer, HIGH);
    digitalWrite(led2, HIGH);
    delay(1000);
  }
  // put your main code here, to run repeatedly:

}