Counting pulses

Hmmmm... you are quite right :slight_smile:

Now this is working much better - thank you, I think I'm there.

void reportAnemometer()
{ 
  Serial.println("Measuring");
  currentTime = millis();
  Serial.print("currentTime: ");
  Serial.println(currentTime);
  PCintPort::attachInterrupt(PIN1, &windPulse, RISING);
  delay(5000);
  PCintPort::detachInterrupt(PIN1);
  WindSpeed = (wPulse/ 5) * 2.4; //2.4 K/h for one switch closure per second
  Serial.print("wPulse: ");
  Serial.println(wPulse);
  Serial.print("WindSpeed: ");
  Serial.println(WindSpeed);
  wPulse=0;
  WindSpeed=0;
  Serial.println("Finished");
}