     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)) {

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


    sequence[i] = redButton;
  }
  
  stateRedButton = 0;
  
}

void loop() {
  
    computeButtonStates(0, redButton, redLed);  
    computeButtonStates(1, greenButton, greenLed);  
    computeButtonStates(2, yellowButton, yello);  
    computeButtonStates(3, blueButton);  
  
  if (state == stateNewLevel) {
    level ++;
