int button = 2;
int cState = LOW;
void setup() {
// put your setup code here, to run once:
pinMode(button, INPUT);
Serial.begin(9600);
Serial.println("Examine Button Press");
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(button)==1){
Serial.println("Button pressed");
cState = HIGH;
delay(500);
cState = LOW;
}
else{cState = LOW;}
}