             maxIndex = i;
         }
     }
-    Serial.print("INDEX: "); Serial.println(maxIndex);
+    //Serial.print("INDEX: "); Serial.println(maxIndex);
 
     float phase = phases[maxIndex];
 

#include <Adafruit_Sensor.h>
#include <PDM.h>
#include <KickFFT.h>
#include <float.h>

#define ACC_SIZE 64
#define FFT_SIZE 512

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


  // each sample changes the phase _phaseRateAverage rads
