 Servo motor_front;
 Servo motor_back;
 
-
 // PID variables
-bool auto_stabilisation_mode = false; //activer ou pas le mode auto-stabilisé: utiliser le switch de input 5 ou 6
-int dt = 3;//notre dt est de 100 millisecondes
+bool auto_stabilisation_mode = false; //activer ou pas le mode auto-stabilisé
+int dt = 3;
 double pid_roll_speed_in, pid_roll_angle_in,   pid_roll_out,   pid_roll_setpoint,  roll_error,  Integral_roll_error,  Derivative_roll_error,  last_roll_error, AS_roll_error, AS_Integral_roll_error, AS_Derivative_roll_error, AS_last_roll_error = 0;
 double pid_pitch_speed_in, pid_pitch_angle_in,  pid_pitch_out,  pid_pitch_setpoint, pitch_error, Integral_pitch_error, Derivative_pitch_error, last_pitch_error, AS_pitch_error, AS_Integral_pitch_error, AS_Derivative_pitch_error, AS_last_pitch_error = 0;
 double pid_yaw_speed_in,    pid_yaw_out,       pid_yaw_setpoint,   yaw_error,   Integral_yaw_error,   Derivative_yaw_error,   last_yaw_error = 0;

  Serial.print(",");
  Serial.println(mB);
}
void print_pid_values() {
  Serial.print(input[0]);
  Serial.print(",");
  Serial.println(pid_roll_out);
}

//foncition qui s'execute une fois et au début
void setup() {
  Serial.begin(250000);
  bno_initialisation();
  rx_initialize();
  motor_right.attach(MOTOR_PIN_RIGHT);

  rx_read();
  bno_get_values();
  control_update();
  print_pitch_and_roll();
}
