int button=8;
void setup() {
// put your setup code here, to run once:
pinMode(button,INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(button)==HIGH)
{
Serial.println("Button On");
}
else
{
Serial.println("Button Off");
}
delay(1000);
}