         PORTD &= B00001111;                                        //Set digital poort 4, 5, 6 and 7 low.
         delay(3);                                                  //Wait 3 milliseconds before the next loop.
     }
-    
+
     //Now that we have 2000 measures, we need to devide by 2000 to get the average gyro offset.
     gyro_roll_cal /= N_SAMPLES;                                       //Divide the roll total by 2000.
     gyro_pitch_cal /= N_SAMPLES;                                      //Divide the pitch total by 2000.


    //Wait until the receiver is active and the throtle is set to the lower position.
    while(receiver_input_channel_2 < 900 || receiver_input_channel_2 > 1040 || receiver_input_channel_1 < 1400){
      start ++;     
                                                 //While waiting increment start whith every loop.
        //We don't want the esc's to be beeping annoyingly. So let's give them a 1000us puls while waiting for the receiver inputs.
        PORTD |= B11110000;                                        //Set digital poort 4, 5, 6 and 7 high.

    //All the information for controlling the motor's is available.
    //The refresh rate is 250Hz. That means the esc's need there pulse every 4ms.
    while(micros() - loop_timer < 4000);                                      //We wait until 4000us are passed.

    loop_timer = micros();                                                    //Set the timer for the next loop.

    PORTD |= B11110000;                                                       //Set digital outputs 4,5,6 and 7 high.
