Tello drone programming (part1)

0_MHgTJR4crfgYiURv.jpeg

Let's talk about “controlling a drone using python”, maybe to find and track a person, use your hand gesture instead of a controller or to cross a window, etc

we know that we need a drone(DJI Tello) and a computer with a wifi adapter to run our code and send commands to the drone.

Tello uses a UDP server-client connection to receive commands and send responses

you should set up a UDP client on your system to send commands and receive responses (we will talk about commands and responses later on) optional: you can set up a UDP server on your system to receive the Tello state.

first send the “command” command to the drone using your UDP client,(Tello IP:192.168.10.1, UDP port:8889) to initiate Tello’s SDK mode otherwise your next command won't work!

use your UDP server and listen to the messages from IP 0.0.0.0 via UDP PORT 8890 to receive the Tello state (optional part)

Use Tello camera

To receive the Tello video stream, first, you need to send the “streamon” command(on SDK mode) to active video streaming and then Set up a UDP server on your system and listen to the messages from IP 0.0.0.0 via UDP port 11111.

Tello commands and results Tello has 3 types of commands.

control commands (returns ok or error)

read commands (returns the parameter-s)

set commands (returns ok or error)

you can learn about installing DjiTelloPy and see the list of commands in the next part. goodbye, Peace!

Did you find this article valuable?

Support danial hamedi taher bonab by becoming a sponsor. Any amount is appreciated!