Crates.io | tello-edu |
lib.rs | tello-edu |
version | 0.5.5 |
source | src |
created_at | 2023-04-14 10:36:50.696239 |
updated_at | 2023-04-23 07:18:41.671606 |
description | A library for controlling and interacting with the Tello EDU drone. |
homepage | |
repository | https://github.com/robagar/tello-edu-rs |
max_upload_size | |
id | 839091 |
size | 87,505 |
A library for controlling and interacting with the Tello EDU drone using asynchronous Rust and Tokio. All operations are implemented as awaitable futures, completed when the drone sends acknowledgment of the command message.
use tello_edu::{Tello, Result};
#[tokio::main]
async fn main() {
fly().await.unwrap();
}
async fn fly() -> Result<()> {
// create a new drone in the `NoWifi` state
let drone = Tello::new();
// wait until the host computer joins the drone's Wifi network
// (joining the network is not automatic - how it happens is up to you)
let drone = drone.wait_for_wifi().await?;
// establish connection and put the drone in "command" mode
let drone = drone.connect().await?;
// fly!
drone.take_off().await?;
drone.turn_clockwise(360).await?;
drone.land().await?;
Ok(())
}
(If Python is more your thing, there is also an equivalent asynchronous Python package - tello-asyncio.)
0.1.0
Basic drone control
0.1.1
0.2.0
More drone control
0.3.1
Drone state
0.4.0
Video
0.5.0
Remote control
real-time control
example using game controller to fly the drone