Skip to main content

Tello Drone - Getting Started

TST, Hongkong

Tello by Ryze Robotics, Shenzhen :: We set out to build the most fun drone ever, and we came up with Tello: an impressive little drone for kids and adults that’s a blast to fly and helps users learn about drones with coding education. Get yourself a Tello to find out just how awesome flying can be!

Tello App :: Tello App can experience more flight modes of Tello, with real-time image-transmission interface and camera,video-recording functions, which can easily experience the fun of aerial-photography. Tello app can also set the parameters of the drone, upgrade the firmware and calibrate the drone. Therefore, the Tello app is an essential software for using the Tello. Direct Download Link

Python Interface

DJITelloPy :: DJI Tello drone python interface using the official Tello SDK and Tello EDU SDK. This library has the following features:

  • implementation of all tello commands
  • easily retrieve a video stream
  • receive and parse state packets
  • control a swarm of drones
pip install djitellopy pygame

Connect your computer to the Tello drones WiFi network and run the following script to verify that you can connect - this should return the battery charge in percent:

from djitellopy import tello
from time import sleep

drone = tello.Tello()
drone.connect()

print(drone.get_battery())

Basic Movement

The drones movement can be controlled using the send_rc_control function:

  • Arguments:
    • left_right_velocity: -100~100 (left/right)
    • forward_backward_velocity: -100~100 (forward/backward)
    • up_down_velocity: -100~100 (up/down)
    • yaw_velocity: -100~100 (yaw)
# take off & move forward for 1s
drone.takeoff()
drone.send_rc_control(0, 50, 0, 0)
sleep(1)
# move right for 1s
drone.send_rc_control(50, 0, 0, 0)
sleep(1)
# move backward for 1s
drone.send_rc_control(0, -50, 0, 0)
sleep(1)
# move left for 1s
drone.send_rc_control(-50, 0, 0, 0)
sleep(1)
# stop & land
drone.send_rc_control(0, 0, 0, 0)
drone.land()

Image Capture

To enable us to capture frames from the drones primary camera we first have to enable the video stream:

import cv2 as cv

drone.streamon()

And then run a loop over the frames we are receiving:

while True:
frame = drone.get_frame_read().frame
img = cv.resize(frame, (360,240))

cv.imshow('Live Stream', img)
if cv.waitKey(1) & 0xFF == ord('q'):
drone.streamoff()
break

cv.destoyAllWindows()

Keyboard Control