 
 //peak finding variables
 const int number_of_peaks = 5;
-const int noise_floor = 50;
+const int noise_floor = 100;
 int biggest_peaks[number_of_peaks];
-int dB3[FFT_N/2];
+int peak_power[FFT_N/2];
 
 //State Data
 boolean is_microphone = true;
-int down_sampling_rate = 5;
+int down_sampling_rate = 1;
 
 void setup() {
     // declare the ledPin as an OUTPUT:


  //Initialize peak arrays
    for (int i = 0; i<FFT_N/2;i++){
    dB3[i] = 0;
  }
  
  for (int i = 1; i < FFT_N/2-1; i++){

  //extract the biggest peaks
  int smallest_max_peak = 0;
  for (int i = 0; i<FFT_N/2;i++){
    if (peak_power[i] > smallest_max_peak){ 

      //Determine the index of the current smallest peak
      int smallest_peak_index=0;
      int smallest_peak=20000;
      for (int j = 0; j<number_of_peaks;j++){
           if(peak_power[biggest_peaks[j]]<smallest_peak){
            smallest_peak = peak_power[biggest_peaks[j]];
            smallest_peak_index = j;
           }
      }
