emergency_stop() / emergencyStop()

Description

This function immediately stops all commands and stops all motors, so the drone will stop flying immediately.
The function will also zero-out all of the flight motion variables to 0.

Syntax

Python: emergency_stop() Arduino: emergencyStop()

Parameters

None

Returns

None

Example Code
Python
#Python code
import CoDrone

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

    drone.emergency_stop()

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

void setup(){
    //open serial and connect
    CoDrone.begin(115200);
    CoDrone.pair(Nearest);

    CoDrone.takeoff();      // take off and hover for 3 second
    CoDrone.emergencyStop();    // emergency stop   
}

void loop(){

}