Last active
June 14, 2020 14:27
-
-
Save youngsoul/a935e94110e83de4a8d3dd800c6c8a89 to your computer and use it in GitHub Desktop.
Quick test of the Tello Python API by https://github.com/damiafuentes/DJITelloPy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from djitellopy import Tello | |
| import time | |
| # see: https://github.com/damiafuentes/DJITelloPy | |
| print("Create Tello object") | |
| tello = Tello() | |
| print("Connect to Tello Drone") | |
| tello.connect() | |
| print(f"Battery Life Pecentage: {tello.get_battery()}") | |
| print("Takeoff - hoser!") | |
| tello.takeoff() | |
| time.sleep(1) | |
| print("Move Left X cm") | |
| tello.move_left(50) | |
| time.sleep(1) | |
| print("Rotate clockwise") | |
| tello.rotate_clockwise(90) | |
| time.sleep(1) | |
| print("Move forward X cm") | |
| tello.move_forward(50) | |
| print("Prepare floor to land.... you have 1 second") | |
| time.sleep(1) | |
| print("landing") | |
| tello.land() | |
| print("touchdown.... goodbye") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment