'No command land 'P' error message after takeoff using djitellopy

181 Views Asked by At

I have written this very simple code:

from djitellopy import Tello
import time
tello=Tello
tello.takeoff() # works just fine!
time.sleep(2)
tello.land() # returns error!

If there is any help I would appreciate it greatly!

1

There are 1 best solutions below

0
On

i can see what your error is, on line 3 in your code,

from djitellopy import Tello
import time
tello=Tello
tello.takeoff() # works just fine!
time.sleep(2)
tello.land() # returns error!

look closely at the tello=Tello .. that needs to be tello=Tello(), so ur code becomes this:

from djitellopy import Tello
import time
tello=Tello()
tello.takeoff() # works just fine!
time.sleep(2)
tello.land() # returns error!

and that should work fine! enjoy!