         accum += v;
       }
     }
-    //note = notef/accum;
+    note = notef/accum;*/
 }
 
 

 pinMode(12, OUTPUT);
}


void detect_note(float& note, float& volume)
{
    cli();
    volume=0;
    for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples
      int k = 512-analogRead(A0);
      volume += abs(k);
      k -= 0x0200;
      k <<= 6;
      fht_input[i] = k ; // put real data into bins
    }
    volume = volume/FHT_N;
    fht_window(); // window the data for better frequency response
    fht_reorder(); // reorder the data before doing the fht

             pin13_state=LOW;
           digitalWrite(13, pin13_state);
         }
      if((abs(sequence[(10+seq_index-4)%10]-19)<=1) &&
         (abs(sequence[(10+seq_index-3)%10]-17)<=1) &&
         (abs(sequence[(10+seq_index-2)%10]-19)<=1) &&
         (abs(sequence[(10+seq_index-1)%10]-17)<=1))
         {
           Serial.println("SPELL!");
           if(pin12_state==LOW)
