Skip to content

Demonstration Application

Dave Walker edited this page Jan 4, 2020 · 6 revisions

The demonstration application uses the TelloCommander API to demonstrate how to connect to and communicate with a drone using the API.

It provides the following connection types:

Type Purpose
Mock Uses a mock that simulates responses from the drone without establishing a connection
Simulator The API is connected to the simulator, running on the same machine
Drone The API is connected to a real drone

Running the Application

To run the demonstration/test application, open a terminal window, change to the folder containing the compiled output for the TelloCommander.TestApp project and run the following command:

TelloCommander.TestApp

The following will be displayed:

Tello Commander 1.0.0.0

Dictionary Version:

[1] 1.3.0.0
[2] 2.0.0.0

Please enter your option between 1 and 2 or enter 0 to quit:

Selecting a Tello API Version

The dictionary (or API) version determines the set of commands available to run. For mock or simulator connections, any version can be used but for connection to a real drone it's important to choose the correct version:

Drone Version
Tello 1.3.0.0
Tello EDU 2.0.0.0

Selecting a Connection Type

Once you have selected the API version, you are prompted to enter the required connection type:

Connection:

[1] Mock connection
[2] Simulator connection
[3] Real connection

Please enter your option between 1 and 3 or enter 0 to quit:

If you're connecting to the simulator, start it before entering the connection type (see instructions, below).

If you're connecting to a drone, switch it on and connect to its WiFi before entering the connection type.

Once a connection type's been entered, the test application will respond as follows, indicating it's connected and ready to receive and send commands:

You are connected to the Tello in API mode

Enter command or hit ENTER to quit :

Entering Commands

The test application repeatedly prompts for and sends commands, echoing the reponse from the connection, until instructed to stop. For example:

Enter command or hit ENTER to quit : takeoff
Command : takeoff
Response: ok

Enter command or hit ENTER to quit : land
Command : land
Response: ok

Enter command or hit ENTER to quit :

In addition to the commands documented in the API documentation for the drone, the API also supports a number of custom commands documented in the project Wiki.

Closing the Connection

Before closing the test application, please:

  • Land the drone, if you are connected to a real drone
  • Stop the simulator, by issuing the "stopsimulator" command, if you are using a simulator connection

To close the connection and stop the test application, enter an empty command in response to the prompt.