1extern crate tello_edu;
2
3use tello_edu::{Tello, Result};
4
5#[tokio::main]
6async fn main() {
7 fly().await.unwrap();
8}
9
10async fn fly() -> Result<()> {
11 let drone = Tello::new()
12 .wait_for_wifi().await?;
13
14 let drone = drone.connect().await?;
15
16 drone.take_off().await?;
17
18 drone.set_speed(25).await?;
20 drone.move_forward(300).await?;
21
22 drone.turn_clockwise(180).await?;
23
24 drone.set_speed(100).await?;
26 drone.move_forward(300).await?;
27
28 drone.turn_clockwise(180).await?;
29
30 drone.land().await?;
31
32 Ok(())
33}