       switch (tag) {
         case 'a':   //pos A
           dataOut[completo] = dataIn * (100800 / 360) + 500000;
-          Serial.println(tag);
-
-          Serial.print(dataIn);
-          Serial.print(" // ");
-          Serial.print(dataOut[completo]);
-          Serial.print(" // ");
-          Serial.println(completo);
-          
+          Serial.print(tag);
+          Serial.print(dataIn);
+          Serial.print(" // ");
+          Serial.println(dataOut[completo]);
           completo++;
           break;
         case 'A':

            dataOut[completo] = dataIn * (100800 / 360) + 20500000;
          }
          Serial.print(tag);
          completo++;
          break;
        case 's':
          dataOut[completo] = 15500000;
          completo = 6;
          break;
        case 'z':
          switch (dataIn) {
            case 1:
              dataOut[completo] = 4500000;
              completo = 6;
              break;
            case 2:
              dataOut[completo] = 5500000;
              completo = 6;
              break;
            case 3:
              dataOut[completo] = 12500000;
              completo = 6;
              break;
            case 4:
              dataOut[completo] = 13500000;
              completo = 6;
              break;
            case 5:
              dataOut[completo] = 14500000;
              completo = 6;
              break;
            default:
              Serial.println("motore non esistente");
              break;
          }
          break;
        default:
          Serial.println("comando inesistente");
          break;

void setup() {
  // put your setup code here, to run once:
  pinMode(53, OUTPUT);
  pinMode(52, OUTPUT);
  pinMode(51, OUTPUT);
  pinMode(50, OUTPUT);

  Serial.begin(9600);
  Serial2.begin(4800);

  pinMode(12, INPUT_PULLUP);

  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  digitalWrite(6, HIGH);
  digitalWrite(7, HIGH);

}

bool oki = false;
uint32_t dataOut[5] = {0,0,0,0,0};
long dataIn = 0;
char tag;
bool inv = false;

uint8_t completo = 0;

String inString = "";

void loop() {
  /*// put your main code here, to run repeatedly:
    if (digitalRead(12)) {
    digitalWrite(52,HIGH);
    if (oki) {
      Serial2.println("ciao");
      oki = false;
    }
    }
    else {
    digitalWrite(52,LOW);
    oki = true;
    }*/
  if (Serial.available() > 0) {
    int inChar = Serial.read();
    if (isDigit(inChar)) {
