Lesson: Getting Started with Tello Programming

Learn about the Tello programming model and how the Tello SDK supports that model.

Understand how the Tello is controlled using the Tello SDK.


Programming Tello drones follows a different model than the other robotics platforms discussed in this curriculum. Rather than writing programs that are downloaded to the drone for execution, like the other platforms, Tello programs are executed on the development PC and control the drone by sending it commands over a WIFI connection. So you are writing a PC program rather than a program deployed to a robotics platform.

The Tello drone is controlled by sending textual commands, like "takeoff" or "land", over a WIFI connection between the drone and your PC. The Tello creates a WIFI access point when it is turned on and you connect to it from your PC like you connect to any other access point. The drone listens on the network connection for commands sent via the User Datagram Protocol (UDP). UDP is a simple connectionless network communication protocol. The drone sends status information and a video stream back that can be received and processed by your program. The other robotics platforms generally use the same form of communication to download code and send control signals to robots. With those platforms, the network communications are packaged for the programmer as part of each robot SDK and you pretty much ignore the software details of that communication. This is not the case with the Tello. The Tello programmer has to handle all aspects of network communication and all processing of the data sent and received.

While UPD is a simple protocol, the actual details of using it to control the drone are a bit complex. To make it easier to get started and provide an example of how such communication is programmed, we developed the Tello-SDK project. This project contains a complete, robust implementation of the UDP communications required. This is presented as an API you can use to write programs that control the Tello.

The Tello "SDK" from the manufacturer is actually just the command set supported by each drone. There are many commands, some with parameters and almost all cause the drone to return status information, which can be received and processed. To make getting started easier, the Tello-SDK contains a high level API that abstracts all of the drone commands as callable functions, making it easy to send commands to the drone and handle the results. To write drone control programs, you just add classes to the Tello-SDK project that make use of the APIs provided, compile and run. 

Additionally, the Tello-SDK project includes many helper functions for advanced capabilities and support for the complex task of handling the video feed from the Tello EDU. This includes displaying the feed right on your PC.

One other important thing that is part of the Tello-SDK is error handling. Just like regular robots, an error in your program may cause unexpected and undesirable behavior. Code failure is probably more serious with drones as a program crash may well leave your drone flying but not under your control. This can be dangerous. The Tello-SDK and the programming examples are designed to detect and recover from program errors and land the drone safely. 

The Tello-SDK allows you to quickly get started flying the Tello with Java code without having to learn all the details of raw drone programming. However, for those who want to explore the details how it is done, the source code for the API is included the project and available to the studied.

We will explore how to use the Tello-SDK API in the following lessons.