Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

Tello and Python

firesdstny

Member
Joined
Jul 9, 2020
Messages
5
Reaction score
4
I am very new to this, and the Tello is the first drone I've had. I'm trying how to get them to fly using python - both a pre-programmed series of commands and a "live action" flight controlled by the keyboard of my laptop.

I am using djitellopy and I can connect to the drone and get it to takeoff and land. But nothing in between. move_forward, rotate_clockwise, etc. do not work.
This is what it says in the terminal:
end command: forward 200
Response: b'error Not joystick'

I've seen some cool videos of things with the cameras on youtube, but I figure I need to understand the basics before I get into anything more complex.

Please help!

P.S. Assume I know nothing about how it is actually connecting and you're probably pretty close to accurate...
 

firesdstny

Member
Joined
Jul 9, 2020
Messages
5
Reaction score
4
Here's the pre-programmed script I was trying to run:


from djitellopy import Tello
tello = Tello()
tello.connect()
tello.takeoff()
tello.move_forward(100)
tello.move_forward(200)
tello.rotate_counterclockwise(90)
tello.move_forward(100)
tello.rotate_clockwise(90)
tello.land()

Very simple just to get the feel for it. All it did was takeoff, hover for a few seconds, then land.
Any help would be appreciated.
Also, I am using MS Visual Studio Code for working with Python and then running in the terminal. Again - assume I do not actually know the best way to do this stuff. MS VSC is the IDE my students will have access too also.
 

Dan

Well-known member
Joined
Feb 20, 2020
Messages
50
Reaction score
20
Hello
We are also not experts in this field, but have extensive experiences with teaching how to fly it and program it. have no experience with djitellopy, but considerable with Python. The program looks relatively simple. The thing i see, is that commands to close together, confuses the drone. You need a pause command..between commands. Also the command at the start is missing ( maybe in djitellopy, you do not need it ) The Tello will land if no command is received in 15 seconds, so maybe the land command is not getting there either.
i would recommend using Packetsender. it will communicate back to you from the Tello. We also do not use Visual Studio. the windows 10 IDE is easy, also Thorny on the Linux with a Raspberry Pi. The simplest that we have found for students is using Windows batch commands with Packetsender. You can find our work on youtube channel MECATX,, or communicate with me at [email protected]. We can also do ZOOM sessions. Why not just use Python. you can find many sample programs on youtube or on line. Best to start simple and mpve up. this is a very complicated little drone for many reasons. It is using old WiFi protocols ( n ), very short battery life ( especially when learning to fly and connect ). At 50% battery it will not do flips, and at 10% will not fly, so do not turn the Tello on, until everything else is working using Packetsender to evaluate.I hoe this helps, and contact me if you need more. Please tell me where you are located. We are iin Texas, USA.
 

firesdstny

Member
Joined
Jul 9, 2020
Messages
5
Reaction score
4
Thanks for the reply! I am in Illinois, USA and I have downloaded Packet Sender. One of the videos I watched recommended it, but looking for more info on what to do (I feel like I need the dinosaur version...step by step by step...) I came up empty.

I will do a little digging, but if I run into some trouble or have more specific questions I will definitely contact! Thank you!
 

Dan

Well-known member
Joined
Feb 20, 2020
Messages
50
Reaction score
20
Thank you for your quick reply. I grew up in aurora, Illinois, spent time in school in Chicago. We have a video youtube MECATX of a zoom online session about Packetsender. We could do a ZOOM session if you want. It is a great very simple program that will fly the Tello, and solve many problems. Setup is quick and easy. it takes a little knowledge of WiFi to understand how to connect to the tello. Tello uses the UPD Wifi protocol to communicate. It uses Port 8889 for connection and Post 9000 to answer ( acknowledge ) And an ASCII packet. That is about the setup that needs to be done.use these parameters to set up the Tello commands, and you are flying.

Here is a link to our youtube ZOOM session on Packetsender.



Good Luck
 

Dan

Well-known member
Joined
Feb 20, 2020
Messages
50
Reaction score
20
Thank you for your quick reply. I grew up in aurora, Illinois, spent time in school in Chicago. We have a video youtube MECATX of a zoom online session about Packetsender. We could do a ZOOM session if you want. It is a great very simple program that will fly the Tello, and solve many problems. Setup is quick and easy. it takes a little knowledge of WiFi to understand how to connect to the tello. Tello uses the UPD Wifi protocol to communicate. It uses Port 8889 for connection and Post 9000 to answer ( acknowledge ) And an ASCII packet. That is about the setup that needs to be done.use these parameters to set up the Tello commands, and you are flying.

Here is a link to our youtube ZOOM session on Packetsender.



Good Luck
 

New Threads

Members online

Forum statistics

Threads
4,582
Messages
33,710
Members
11,822
Latest member
TelloDronny