   {
     delay(delayRemaining);
   }
+  else
+  {
+    Serial.print("Delay overran!");
+  }
+  
 }
 
 void PrintVector(double *vData, uint8_t bufferSize, uint8_t scaleType) 

  //double x = FFT.MajorPeak(vReal, samples, samplingFrequency);

  //TODO: extract power in system...
  double x;
  
  Serial.println(x, 6);

  //TODO: Output to servo
  myservo.write(x);
  
  //log finished time & sleep for remaining of sampling time

  waveform[waveformHead] = analogRead(mic_ana_pin); //0-1023
  
  //copy waveform out
  for (uint8_t i = 0; i < samples; ++i) 
  {
    vReal[i] = waveform[ (i + waveformHead) % samples ];
  }
  //update waveformHead for next pass
