Rust library for BYROBOT drones.
[dependencies]
e_drone_sp="21.*"
e_drone="21.*"
```rust extern crate edronesp;
use edrone::system::{*}; use edrone::protocol::{}; use e_drone_sp::{};
fn main() { let mut drone: Drone = Drone::new("COM75");
if drone.is_connected() == false {
return;
}
drone.request(DeviceType::Controller, DataType::Information);
loop {
handler(&drone.check());
if drone.get_time_passed_from_last_transfer() > 1200 {
break;
}
}
}
fn handler(data: &Data) { match data { Data::Information(information) => { println!("{:?}", information); }, _ => {}, } } ```
https://github.com/byrobot-rust/edronesp/tree/master/examples
cargo run --example buzzer_hz
cargo run --example buzzer_scale
cargo run --example display_drawline
cargo run --example request_information
cargo run --example vibrator