In this lesson we will be starting to program our drones with Python before we get into programming.
I want to check on the documents go to h TTP s Khan slash slash store dot DJI dot com.
This will take you to the DJI store.
Click on the tallow drone on the right side of the screen here you will see both tallow and Teller I
do we will be programming so that both of the tallow products can run on it as the tallow is an older
version with less functions.
We will be looking into the tallow Adu to check on documents so click on the tallow and you scroll all
the way down down down on the bottom of the page you will find this tiny link.
Click on the link that says click here.
Here you will find the documents for Tello Edu.
There are multiple documents such as scratch read me where you can program your drone using Scratch.
But in this lesson we will be looking at the SDK 2.0 User Guide.
Click on the user guide you will see the user guide in a PD f format.
We won't be going into the entire document during this lesson but just a quick look here you can see
which IP addresses we will be using.
Also the port number which is 8 8 8 9 to communicate and receive responses.
Or if you want to receive the telco status the port number will be 8 8 9 0 for a video stream.
The port will be 1 1 1 1.
Now I want you to scroll down a bit to Tello commands.
When you communicate between your Mac and your Tello you will be using UDP.
Here you will see the actual commands.
You will need takeoff means to command your drone to take off and land means to land which is quite
straightforward.
We need these commands to program how the drone should operate.
If you want to fly the drone higher you need to set command up followed by a number which will be the
height of how much you want the drone to fly higher.
Go ahead and read through the command lists so you can have an idea of what kind of commands exist.
Unfortunately we won't be going through every single command during this course but we will be using
enough command so you will understand how the drone works with these commands and you will know how
to use the commands on your own.
Now let's go back to the Tello edu page.
This time we'll click on the link where it says view sample codes once you click on the link the page
will move to the Hub page here you will find sample codes for Python this video is made in March 20
19.
You can see that the codes have been updated 14 days ago depending on when you're checking this.
You may be seeing a slightly different list.
Let's check and see some of the sample codes on the top of the lists you'll see single Tello test.
Click on the link and the list you'll find Tello dot P Y.
Click on that as well.
And the sample code you will see some codes using socket to connect the Tello and sending commands.
If you check where the print command is written you will see that there is a space between the print
and the text.
This is a style used for Python to in our lesson.
We won't be using a sample code.
We will be creating our own codes from scratch.
There is a reason we won't be using these standard codes.
Now let's go back to Tello python and click on Tello video.
This goes is for the purpose of streaming videos from the drone onto your computer.
There are packages ready for you to install and I've tried all three packages for Linux Mac and Windows
but unfortunately the Mac and Windows package didn't work.
The Linux version did work a bit but with the newer version of Python it didn't correspond correctly.
I didn't want to go through such a hassle so I create an original code using open c v and f of MPEG.
This where we can easily install the tools we need in a more simple manner.
I'm not saying everything on the site doesn't work.
Maybe in the near future once it catches up with Python 3 we may be able to use it more.
You might want to look into this site once in a while for the updates.
The sample codes are great to look into so you can learn more things to do with your drone.
In our next lesson we will be creating codes to actually fly the drones.