 
 // handle interrupt pulses from the taps and send the START message
 void tap1Pulse() {
-  int pulses = ++_tap1Pulses;
+  long pulses = ++_tap1Pulses;
   if(pulses == _startThreshold) {
     Serial.print("START 1 ");
     Serial.println(pulses, DEC);
   }
 }
 void tap2Pulse() {
-  int pulses = ++_tap2Pulses;
+  long pulses = ++_tap2Pulses;
   if(pulses == _startThreshold) {
     Serial.print("START 2 ");
     Serial.println(pulses, DEC);

// main loop - once a second, check the accumulated pulse counts and send the STOP/CONTINUE/IGNORE message as necessary
// send an ALIVE message every loop to assist debugging
void loop() {
  int lastTap1Pulses = 0;
  int lastTap2Pulses = 0;
  while(true) {
    int tap1Pulses = _tap1Pulses;
    if(lastTap1Pulses != 0 && lastTap1Pulses == tap1Pulses) {
      // complete
      _tap1Pulses = 0;

    delay(1000);
  }
}
