void setup() {
pinMode(buttonpin,INPUT);
pinMode(led,OUTPUT);
Serial.begin(9600);
}
void loop() {
buttonstate=digitalRead(buttonpin);
Serial.print("buttonstate status is:");
Serial.println(buttonstate);
if(buttonstate==HIGH);
else
digitalWrite(led,LOW);
delay(500);
}