Невозможно преобразовать последовательную строку в символ

Я пытаюсь написать программу для управления четырьмя двигателями через последовательный порт. Я планировал реализовать это, передавая команды скорости и направления вращения двигателей в виде строки, которая затем преобразуется в числовые значения, представляющие скорость и направление. К сожалению, преобразование не работает, и мои двигатели не вращаются.

int motorGroup1_Direction = 13;
int motorGroup1_Speed = 12;

int motorGroup2_Direction = 11;
int motorGroup2_Speed = 10;

int motorGroup3_Direction = 9;
int motorGroup3_Speed = 8;

int motorGroup4_Direction = 7;
int motorGroup4_Speed = 6;

String command; //Первая цифра — направление, следующие 3 цифры — скорость. Пробел служит разделителем, повторите для
//Для следующих трех моторов
char hold;
char letter;
char send[8];

void setup() {
  Serial.begin(9600);
  pinMode(motorGroup1_Direction, OUTPUT);

  pinMode(motorGroup1_Speed, OUTPUT);

  pinMode(motorGroup2_Direction, OUTPUT);
  pinMode(motorGroup2_Speed, OUTPUT);

  pinMode(motorGroup3_Direction, OUTPUT);
  pinMode(motorGroup3_Speed, OUTPUT);

  pinMode(motorGroup4_Direction, OUTPUT);
  pinMode(motorGroup4_Speed, OUTPUT);
}

void loop() {
  int trackParse = 0;
  int trackString = 0;

  while (Serial.available() > 0) {
    hold = Serial.read();

    if (hold == ' ') {

      send[trackParse] = (char)command.toInt();
      Serial.write(send[trackParse]);
      trackParse++;
      delay(2);
    }
    else {
      command[trackString] = hold;
      trackString++;
      delay(2);
    }
  }

  digitalWrite(motorGroup1_Direction, send[0]);
  Serial.println(send[0]);

  analogWrite(motorGroup1_Speed, send[1]);
  Serial.println(send[1]);


  digitalWrite(motorGroup2_Direction, send[2]);
  Serial.println(send[2]);

  analogWrite(motorGroup2_Speed, send[3]);
  Serial.println(send[3]);


  digitalWrite(motorGroup3_Direction, send[4]);
  Serial.println(send[4]);

  analogWrite(motorGroup3_Speed, send[5]);
  Serial.println(send[5]);


  digitalWrite(motorGroup4_Direction, send[6]);
  Serial.println(send[6]);

  analogWrite(motorGroup4_Speed, send[7]);
  Serial.println(send[7]);

}

, 👍0