     displayWrite("ripeti");
     currentPlayingSeqIndex = 0;
     
-  }  
-  
+  }
+  
+  if (state == statePlay) {
+    
+    
+    
+      
+  //    stateRedButton = analogRead(A0);
+//      stateRedButton = analogRead(A0);
+  //    stateRedButton = analogRead(A0);
+    //  stateRedButton = analogRead(A0);
+  }
+  
+//  Serial.println(analogRead(A0));
+  /*
   if (pressed(redButton) && (state == statePlay)) {
     checkPressing(redLed, NOTE_C4, redButton); 
   } else if (pressed(greenButton) && (state == statePlay)) {

const int stateNewLevel = 3;
const int statePressedOk = 4;

int level;
int state; 
int sequence[maxLength];
int currentPlayingSeqIndex;

void setup() {
  Serial.begin(9600);

         displayWrite("sbagliato");
         state = stateEnd;
       }
          delay(1000);
          noTone(tonePin);
          allLedOff();

