レッスン6 宙返り そのまま | kazenokinositaのブログ

kazenokinositaのブログ

Telloは少しお休みで、pythonそしてPearOSとたわむれてます

flip は他に訳しようがなかったか、SDKと違いもなく

定義されているようです

<06_flip_left_right.py>

from djitellopy import Tello

import time #この辺から、そろそろ説明を省略

 

print("Create Tello object")

tello = Tello()

 

print("Connect to Tello Drone")

tello.connect()

 

battery_level = tello.get_battery()

print(f"Battery Life Percentage: {battery_level}")

 

print("Takeoff!")

tello.takeoff()

 

time.sleep(1)

 

print("Flip left") #宙返りはそのままflip_left 左宙返り

tello.flip_left()

 

time.sleep(2)

 

print("Flip Right") #右宙返り

tello.flip_right()

 

# try flip_forward 前転 バク転 ありですね

# try flip_back

 

print("landing")

tello.land()

print("touchdown.... goodbye")