Skip to main content

move_right()

Description#

Moves the drone right for the given distance and unit for that distance.

Syntax#

move_right(distance) move_right(distance, unit, speed)

Parameters#

distance: the numerical value of the value to move
unit: The unit of measurement for the distance flown. Available units are "cm" (centimeter), "ft" (feet), "in" (inches), "m" (meter).
speed: default 1 meter per second. Max is 2 meters/second

Returns#

None

Example Code#
Python#
#Python code
from codrone_edu.drone import *
import time
drone = Drone()
drone.pair()
drone.takeoff()
drone.move_right(distance=50, units="cm", speed=1)
time.sleep(3) # make sure to add a delay so the drone has enough time to fly
drone.land()
drone.close()