Skip to main content

go()

Description#

Sends roll, pitch, yaw, throttle values continuously to the drone for duration (seconds)

Syntax#

go(roll, pitch, yaw, throttle, duration)

Parameters#

roll: roll power. int from -100-100
pitch: pitch power. int from -100-100
yaw: yaw power. int from -100-100
throttle: throttle power. int from -100-100
duration: Duration of the movement in seconds

Returns#

None

Example Code#
Python#
#Python code
from codrone_edu.drone import *
drone = Drone()
drone.pair()
drone.takeoff()
drone.go(50, 50, 0, 0, 5) # Drone flies diagonally forward and right for 5 seconds
drone.land()
drone.close()