calibrate()

Description

This function will calibrate your drone and reset all the trim and biases to best suit the current lighting and ground. The CoDrone has flight biases that change based on lighting and the pattern on the ground. After a while, the CoDrone may begin to drift, especially after a lot of flying or a change of environment. When you run this function, the CoDrone's arms will blink green a few times, take off, calibrate for a few seconds, then land. It may drift a little until it stabilizes before finally landing.

Syntax

calibrate()

Parameters

None

Returns

None

Example Code
Python
import CoDrone

def main():
    drone = CoDrone.CoDrone()
    drone.pair()
    drone.calibrate()

if __name__ == '__main__':
    main()
Arduino
//Arduino code
#include<CoDrone.h>     //header

void setup(){
    CoDrone.begin(115200);

    CoDrone.pair();
    delay(1000);
    CoDrone.calibrate();
}
void loop(){

}