init
This commit is contained in:
commit
c1b7c7c3af
|
@ -0,0 +1,21 @@
|
|||
from djitellopy import Tello
|
||||
import cv2
|
||||
|
||||
my_drone = Tello()
|
||||
my_drone.connect()
|
||||
print(my_drone.get_battery())
|
||||
my_drone.streamon()
|
||||
my_drone.set_video_direction(Tello.CAMERA_DOWNWARD)
|
||||
while True:
|
||||
# Read a frame from the video stream
|
||||
img = my_drone.get_frame_read().frame
|
||||
img = cv2.resize(img, (360, 240))
|
||||
# Display the frame
|
||||
cv2.imshow("Image", img)
|
||||
# Check for key press to exit
|
||||
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||
break
|
||||
|
||||
cv2.destroyAllWindows()
|
||||
my_drone.streamoff()
|
||||
# my_drone.land()
|
Binary file not shown.
After Width: | Height: | Size: 941 B |
Loading…
Reference in New Issue