   //double x = FFT.MajorPeak(vReal, samples, samplingFrequency);
 
   //TODO: extract power in system...
-  double x;
+  double x = 0.0;
+  
+  for (uint8_t i = 0; i < samples; ++i) 
+  {
+    x += vReal[i];
+  }
   
   Serial.println(x, 6);
 
-  //TODO: Output to servo
+  //TODO: Scale output to servo
   myservo.write(x);
   
   //log finished time & sleep for remaining of sampling time

  {
    delay(delayRemaining);
  }
}

void PrintVector(double *vData, uint8_t bufferSize, uint8_t scaleType) 

  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
