   if (diff > 2 * magAvg[0]) {
     digitalWrite(LED_PIN, LOW);
 
-    Serial.print("Diff:\t"); Serial.println(diff);
+    Serial.print("Prev :\t");
+    for (int i = 0; i < endIndex; i++) {
+      float phase = prevPhase[i];
+      Serial.print(phase);
+      Serial.print("\t");
+    }
+    Serial.println("");
+
+    // Serial.print("Diff:\t"); Serial.println(diff);
     Serial.print("Phase:\t");
     for (int i = 0; i < endIndex; i++) {
       float phase = phaseAvg[i];

      Serial.print("\t");
    }
    Serial.println("");

  }

  if (diff > 2 * magAvg[0] && phaseNearZero) {
    digitalWrite(LED_PIN, HIGH);

    Serial.print("BPM:\t");
    for (int i = 0; i < endIndex; i++) {

      float newVal = tempBuffer[i];
      lowPass += newVal;
      if (++numInLowPass >= LOW_PASS_SIZE) {
        lowPass /= LOW_PASS_SIZE;
        acc += lowPass * lowPass;
        lowPass = 0;
        numInLowPass = 0;
        numInAcc++;
      }

      if (numInAcc >= ACC_SIZE) {
          addToFFT(acc / 2048);
          acc = 0;
          numInAcc = 0;
      }
