 
 // RX
 int throttle = THROTTLE_RMIN;
-volatile int input[5];
-volatile unsigned long chrono_start0, chrono_start1, chrono_start2, chrono_start3,chrono_start4;
+volatile int input[4], arm;
+volatile unsigned long chrono_start0, chrono_start1, chrono_start2, chrono_start3, chrono_start4;
 volatile int last_interrupt_time0, last_interrupt_time1, last_interrupt_time2, last_interrupt_time3, last_interrupt_time4;
 
 // IMU


// Fonction qui s'execute a chaque cycle
void loop() {
  bno_get_values();
  control_update();
  print_motors();
}

  attachInterrupt(A1, calcSignal1, CHANGE);
  attachInterrupt(A2, calcSignal2, CHANGE);
  attachInterrupt(A3, calcSignal3, CHANGE);
}

// Fonctions qui lisent les valeurs de la radio
void calcSignal0()
{
  last_interrupt_time0 = micros();

  if (digitalRead(A0) == HIGH)
  {
    chrono_start0 = micros();
  }
  else
  {
    if (chrono_start0 != 0)
    {
      input[0] = ((volatile int)micros() - chrono_start0);
      chrono_start0 = 0;
    }
  }
}

void calcSignal1()
{
  last_interrupt_time1 = micros();

  if (digitalRead(A1) == HIGH)
  {
    chrono_start1 = micros();
  }
  else
  {
    if (chrono_start1 != 0)
    {
      input[1] = ((volatile int)micros() - chrono_start1);
      chrono_start1 = 0;
    }
  }
}

void calcSignal2()
{
  last_interrupt_time2 = micros();

  if (digitalRead(A2) == HIGH)
  {
    chrono_start2 = micros();
  }
  else
  {
    if (chrono_start2 != 0)
    {
      input[2] = ((volatile int)micros() - chrono_start2);
      chrono_start2 = 0;
    }
  }
}

void calcSignal3()
{
  last_interrupt_time3 = micros();

  if (digitalRead(A3) == HIGH)
  {
    chrono_start3 = micros();
  }
  else
  {
    if (chrono_start3 != 0)
    {
      input[3] = ((volatile int)micros() - chrono_start3);
      chrono_start3 = 0;
    }
  }
}


// Fonction qui s'execute une fois et au début
void setup() {
