this repo has no description
1from djitellopy import Tello
2
3tello = Tello()
4tello.connect()
5bat = tello.get_battery()
6print(f"Battery level: {bat}%")
7
8if bat < 40:
9 print("Battery too low!")
10 tello.end()
11 quit()
12
13tello.enable_mission_pads()
14tello.set_mission_pad_detection_direction(2)
15
16tello.takeoff()
17
18pad = tello.get_mission_pad_id()
19while pad != 1:
20 print(pad)
21
22 if pad == 4:
23 tello.move_up(100)
24 tello.flip_forward()
25 tello.move_down(100)
26 tello.move_forward(50)
27
28 if pad == -1:
29 tello.move_forward(50)
30
31 pad = tello.get_mission_pad_id()
32
33tello.land()
34