lab31535.com
Spaß mit Nerd-Krams

Drohnensteuerung mit Python - Tello EDU2

Programmgesteuerter Flug einer Minidrohne. (PyCharm)
Dank an:

# https://github.com/damiafuentes/DJITelloPy
# https://github.com/dbaldwin/DroneBlocks-DJITelloPy-Tutorial/blob/master/01_takeoff-land.py


# import cv2
from djitellopy import Tello
import time
tello = Tello()

# battery_level = tello.get_battery()
# battery_level = tello.query_battery()
# print(f"Battery Life Percentage: {battery_level}")
print("Connect to Tello Drone")
tello.connect()
print("takeoff")
tello.takeoff()

# Make a Foto
# tello.streamon()
# frame_read = tello.get_frame_read()
# cv2.imwrite("picture.png", frame_read.frame)
print("Sleep for 5 seconds")
time.sleep(5)
#print("Move Right")
#tello.move_right(10)
print("Move Left")
tello.move_left(80)
print("Flip Right")
tello.flip_right()
print("Flip left")
tello.flip_left()
print("landing")
tello.land()
print("touchdown.... goodbye")

zurück zu Projekte