     }
   }
 }
+
+void galoppo(float v) {
+  bool fine=false;
+  long ii = millis();
+  while (!fine) {
+    digitalWrite(zampaPS,HIGH);
+    if ((millis() - ii) > (300*v) {
+      digitalWrite(zampaPS,LOW);
+    } 
+
+    if ((millis() - ii) > (75*v)) {
+      digitalWrite(zampaPD,HIGH);
+    }
+    if ((millis() - ii) > (375*v)) {
+      digitalWrite(zampaPD,LOW);
+    }
+
+    if ((millis() - ii) > (150*v)) {
+      digitalWrite(zampaAS,HIGH);
+    }
+    if ((millis() - ii) > (450*v)) {
+      digitalWrite(zampaAS,HIGH);
+    }
+
+    if ((millis() - ii) > (225*v)) {
+      digitalWrite(zampaAD,HIGH);
+    }
+    if ((millis() - ii) > (525*v)) {
+      digitalWrite(zampaAD,HIGH);
+    }
+
+    
+
+    digitalWrite(zampaAD,HIGH);
+  }
+}

long t6 = 0;

int tempo = 0;

void setup() {
  delay(1000);

}

void loop() {
  w = map(analogRead(pot),0,1023,0.25,3);

  Serial.print("tempo: ");
  Serial.print(w);
  Serial.println(" ms");

  if (keyboard.available()) {
