int button = 8;

void setup() {                
  pinMode(button, INPUT); 
  Serial.begin(9600); 
}

void loop() {
  if (digitalRead(button)==HIGH){
    Serial.println("Swith is closed");    
  }  
  else{
    Serial.println("Swith is open");
  }  
  delay(1000);
}

