 
 unsigned long accumulator(bool standby) {
   unsigned long startTime, endTime = 0;
-  int signalState, previousState = 0;
+  int signalState = 0;
+  int previousState = NULL;
   
   while(!standby) {
     // read signal state

    Serial.print(" ");
    i++;

    // LED on if an RFID is detected
    if(response[7] != NULL) {
      digitalWrite(ledPin, HIGH);
      // Machine is ready to fire, get ready to track time

    else {
      previousState = signalState;
    }
  }
  return 0;
}


