 
     if(note_duration==4)
     {
-      sequence[seq_index]=current_note;
-      seq_index=(seq_index+1)%10;
-      if((abs(sequence[(10+seq_index-4)%10]-23)<=1) &&
-         (abs(sequence[(10+seq_index-3)%10]-25)<=1) &&
-         (abs(sequence[(10+seq_index-2)%10]-28)<=1) &&
-         (abs(sequence[(10+seq_index-1)%10]-23)<=1))
+      cur_sequence[seq_index]=current_note;
+      /*if((abs(cur_sequence[(10+seq_index-4)%10]-23)<=1) &&
+         (abs(cur_sequence[(10+seq_index-3)%10]-25)<=1) &&
+         (abs(cur_sequence[(10+seq_index-2)%10]-28)<=1) &&
+         (abs(cur_sequence[(10+seq_index-1)%10]-23)<=1))
          {
            Serial.println("SPELL!");
            if(pin13_state==LOW)


#include <FHT.h> // include the library



void setup() {
  Serial.begin(115200); // use the serial port

 // ADC configuration
 // set prescale to 16
 sbi(ADCSRA,ADPS2) ;

    //Serial.print("\n");
    
    if((note>=10) &&(note<117))
    { 
      Serial.print(" ");
      Serial.print(notef);
      Serial.print(" ");
      Serial.print(note);
