Drone.Adapters.Tello (ex_drone v0.1.0)

View Source

Tello drone adapter for ex_drone.

This adapter communicates with DJI Tello and Tello EDU drones over Wi-Fi UDP using the official Tello SDK protocol.

Default Configuration

  • Drone IP: 192.168.10.1
  • Drone port: 8889
  • Local port: 8889
  • Command timeout: 10_000 ms

Usage

{:ok, drone} = Drone.connect(:tello, name: :tello_1)
Drone.connect_sdk(drone)
Drone.takeoff(drone)
Drone.move(drone, :forward, 50)
Drone.land(drone)
Drone.disconnect(drone)

Custom Configuration

{:ok, drone} = Drone.connect(:tello,
  name: :tello_1,
  drone_ip: {192, 168, 10, 1},
  drone_port: 8889,
  local_port: 9030,
  timeout: 15_000
)

Safety warning: The Tello is a real physical drone. Always test in the simulator first. Use prop guards. Do not fly near faces. Have an emergency stop ready.

Summary

Types

t()

@type t() :: %Drone.Adapters.Tello{
  drone_ip: :inet.ip_address(),
  drone_port: non_neg_integer(),
  flying: boolean(),
  mode: :idle | :sdk_mode | :flying | :emergency,
  socket: port() | nil,
  timeout: non_neg_integer(),
  x: integer(),
  y: integer(),
  yaw: integer(),
  z: integer()
}