1
00:00:01,290 --> 00:00:07,620
In this lesson we will be starting to program our drones with Python before we get into programming.

2
00:00:07,620 --> 00:00:16,740
I want to check on the documents go to h TTP s Khan slash slash store dot DJI dot com.

3
00:00:16,740 --> 00:00:19,750
This will take you to the DJI store.

4
00:00:19,890 --> 00:00:26,310
Click on the tallow drone on the right side of the screen here you will see both tallow and Teller I

5
00:00:26,310 --> 00:00:34,560
do we will be programming so that both of the tallow products can run on it as the tallow is an older

6
00:00:34,560 --> 00:00:36,440
version with less functions.

7
00:00:36,510 --> 00:00:43,860
We will be looking into the tallow Adu to check on documents so click on the tallow and you scroll all

8
00:00:43,860 --> 00:00:50,540
the way down down down on the bottom of the page you will find this tiny link.

9
00:00:50,850 --> 00:00:54,480
Click on the link that says click here.

10
00:00:54,570 --> 00:00:59,380
Here you will find the documents for Tello Edu.

11
00:00:59,400 --> 00:01:05,250
There are multiple documents such as scratch read me where you can program your drone using Scratch.

12
00:01:06,360 --> 00:01:12,240
But in this lesson we will be looking at the SDK 2.0 User Guide.

13
00:01:12,240 --> 00:01:18,240
Click on the user guide you will see the user guide in a PD f format.

14
00:01:18,240 --> 00:01:24,900
We won't be going into the entire document during this lesson but just a quick look here you can see

15
00:01:24,900 --> 00:01:28,230
which IP addresses we will be using.

16
00:01:28,260 --> 00:01:34,010
Also the port number which is 8 8 8 9 to communicate and receive responses.

17
00:01:34,380 --> 00:01:41,530
Or if you want to receive the telco status the port number will be 8 8 9 0 for a video stream.

18
00:01:41,550 --> 00:01:45,830
The port will be 1 1 1 1.

19
00:01:45,860 --> 00:01:50,060
Now I want you to scroll down a bit to Tello commands.

20
00:01:50,060 --> 00:01:56,010
When you communicate between your Mac and your Tello you will be using UDP.

21
00:01:56,160 --> 00:01:58,080
Here you will see the actual commands.

22
00:01:58,080 --> 00:02:07,240
You will need takeoff means to command your drone to take off and land means to land which is quite

23
00:02:07,240 --> 00:02:08,970
straightforward.

24
00:02:08,980 --> 00:02:12,660
We need these commands to program how the drone should operate.

25
00:02:12,730 --> 00:02:19,090
If you want to fly the drone higher you need to set command up followed by a number which will be the

26
00:02:19,090 --> 00:02:22,750
height of how much you want the drone to fly higher.

27
00:02:22,750 --> 00:02:29,290
Go ahead and read through the command lists so you can have an idea of what kind of commands exist.

28
00:02:29,320 --> 00:02:35,380
Unfortunately we won't be going through every single command during this course but we will be using

29
00:02:35,380 --> 00:02:41,020
enough command so you will understand how the drone works with these commands and you will know how

30
00:02:41,020 --> 00:02:44,600
to use the commands on your own.

31
00:02:44,610 --> 00:02:47,520
Now let's go back to the Tello edu page.

32
00:02:47,520 --> 00:02:54,510
This time we'll click on the link where it says view sample codes once you click on the link the page

33
00:02:54,510 --> 00:03:03,650
will move to the Hub page here you will find sample codes for Python this video is made in March 20

34
00:03:03,650 --> 00:03:04,690
19.

35
00:03:04,730 --> 00:03:11,110
You can see that the codes have been updated 14 days ago depending on when you're checking this.

36
00:03:11,120 --> 00:03:14,510
You may be seeing a slightly different list.

37
00:03:14,570 --> 00:03:20,660
Let's check and see some of the sample codes on the top of the lists you'll see single Tello test.

38
00:03:20,660 --> 00:03:25,110
Click on the link and the list you'll find Tello dot P Y.

39
00:03:25,160 --> 00:03:26,420
Click on that as well.

40
00:03:27,600 --> 00:03:34,440
And the sample code you will see some codes using socket to connect the Tello and sending commands.

41
00:03:34,440 --> 00:03:39,690
If you check where the print command is written you will see that there is a space between the print

42
00:03:39,870 --> 00:03:41,700
and the text.

43
00:03:41,700 --> 00:03:45,870
This is a style used for Python to in our lesson.

44
00:03:45,870 --> 00:03:47,860
We won't be using a sample code.

45
00:03:48,000 --> 00:03:52,280
We will be creating our own codes from scratch.

46
00:03:52,290 --> 00:03:56,370
There is a reason we won't be using these standard codes.

47
00:03:56,370 --> 00:04:01,380
Now let's go back to Tello python and click on Tello video.

48
00:04:01,390 --> 00:04:07,640
This goes is for the purpose of streaming videos from the drone onto your computer.

49
00:04:07,660 --> 00:04:15,100
There are packages ready for you to install and I've tried all three packages for Linux Mac and Windows

50
00:04:15,700 --> 00:04:19,960
but unfortunately the Mac and Windows package didn't work.

51
00:04:19,960 --> 00:04:27,750
The Linux version did work a bit but with the newer version of Python it didn't correspond correctly.

52
00:04:27,900 --> 00:04:35,090
I didn't want to go through such a hassle so I create an original code using open c v and f of MPEG.

53
00:04:35,160 --> 00:04:40,380
This where we can easily install the tools we need in a more simple manner.

54
00:04:40,380 --> 00:04:43,460
I'm not saying everything on the site doesn't work.

55
00:04:43,560 --> 00:04:49,220
Maybe in the near future once it catches up with Python 3 we may be able to use it more.

56
00:04:49,350 --> 00:04:53,520
You might want to look into this site once in a while for the updates.

57
00:04:53,520 --> 00:04:58,710
The sample codes are great to look into so you can learn more things to do with your drone.

58
00:04:58,740 --> 00:05:03,030
In our next lesson we will be creating codes to actually fly the drones.
