   // each sample changes the phase _phaseRateAverage rads
   
  
-  Serial.print("startIndex: ");
-  Serial.print(startIndex);
+  // Serial.print("startIndex: ");
+  // Serial.print(startIndex);
   Serial.print("  Mag: ");
   for (int i = startIndex; i < endIndex; i++) {
     Serial.print(mag[i]);

  float phase[20];
  uint16_t startIndex, endIndex;
  // KickFFT<int32_t>::fft(fs, 0, 4, FFT_SIZE, fftBuffer, mag, startIndex, endIndex);
  fft_phase(fs, 0, 8, FFT_SIZE, fftBuffer, mag, phase, startIndex, endIndex);
  updatePhase(mag, phase, startIndex, endIndex);
  float hz = fs * _phaseRateAverage / 2 / PI;
  // Serial.print("endIndex: "); Serial.println(endIndex);

            phase -= 2*PI;
        }

        _phase_avg = _phase_avg * 0.9 + phase * 0.1;
        _phase_avg = norm_rads(_phase_avg);
        // Serial.print("Phase    : "); Serial.println(phase);
        // Serial.print("Phase: "); Serial.println(_phase_avg);
