 }
 
 void onPDMdata() {
+  if (samplesRead) {
+    Serial.println("PDM data did not get processed");
+  }
+
   // query the number of bytes available
   int bytesAvailable = PDM.available();
 


// accumulate incoming values to create low pass filter
extern PDMClass PDM;
float acc = 0;
uint16_t numInAcc = 0;


//#define FFT_SIZE 512
//#define HANN_SIZE 60

#define LOW_PASS_SIZE 64 // 250Hz sample freq, this means signals above 125Hz are filtered
#define ACC_SIZE 2 // reduce sample rate before doing fft for performance reasons
#define FFT_SIZE 256
#define HANN_SIZE 40
#define FS (16000.0 / ACC_SIZE)
#define F2 3.5f
#define END_INDEX ((uint16_t) (F2 / (FS / FFT_SIZE)))
