 #define SEL_B 31 //0 su 2
 #define BT_A A14 //0 premuto
 #define BT_B A8 //1 premuto
+
+long muovi(char let, int vel, int posA, int posB, int posC = 0);
+long t0 = 0;
 
 void setup() {
   pinMode(MAINSW, INPUT_PULLUP);

    }
  }
}

  Serial2.begin(4800);
}

int act = 0;
long att1 = 0;
long att2 = 0;
bool inviato = false;

void loop() {
  while (digitalRead(MAINSW)) //SHOW
  {
    if (act == 0) {
      t0 = millis();
      Serial.println("ACT 0");
      inviato = false;
      act++;
    }
    show();
  }
  while (!digitalRead(MAINSW)) //TEST
  {
    act = 0;
    if (Serial.available() > 0) {
      Serial2.write(Serial.read());
    }
    if ((digitalRead(SEL_A) == 0) && (digitalRead(SEL_B) == 1)) //A
    {
      if (digitalRead(BT_A) == 0)  //premuto
