Skip to main content

takeoff()

Description#

This function makes the drone take off and begin hovering.
The drone will always hover for 3 seconds in order to stabilize before it executes the next command.
If it receives no command for 8 seconds, it will automatically land.

Syntax#

takeoff()

Parameters#

None

Returns#

None

Example Code#
Python#
#Python code
import CoDrone
drone = CoDrone.CoDrone()
drone.pair()
drone.takeoff()
drone.hover(3)
drone.land()
drone.close()
Arduino#
//Arduino code
#include<CoDrone.h> //header
void setup(){
//below this have to code in setup
//open serial and connect
CoDrone.begin(115200);
CoDrone.pair(Nearest);
CoDrone.takeoff(); // take off and hover for 3 second
CoDrone.hover(3); // hover for 3 second
CoDrone.land(); //landing
}
void loop(){
}