int pin = 2;
volatile unsigned int pulse;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
pulse=0;
interrupts();
delay(1000);
noInterrupts();
Serial.println(pulse );
}