       yield();
       continue;
     }
+    uint32_t start = micros();
     for (int i = 0; i < samplesRead; i++) {
       float newVal = tempBuffer[i];
       //acc += newVal * newVal;

      //samples--;
    }
    // clear the read count
    samplesRead = 0;
  }
  Serial.print("max: ");

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

// works but slow
//#define ACC_SIZE 64
//#define FFT_SIZE 512
//#define HANN_SIZE 60

#define ACC_SIZE 128
#define FFT_SIZE 256
#define HANN_SIZE 30
#define FS (16000.0 / ACC_SIZE)
#define F2 3.5f
#define END_INDEX ((uint16_t) (F2 / (FS / FFT_SIZE)))
