1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! # Robot Control
//!
//! A Rust library for controlling DC motor robots via PWM motor driver boards.
//!
//! This crate provides a hardware-abstracted [`MotorDriver`] trait, allowing you to
//! control robots in production (with real I2C hardware) and in tests (with a mock driver).
//!
//! ## Features
//!
//! - **`pca9685`** — Enables the `Pca9685MotorBoard`
//! implementation for PCA9685 PWM boards over I2C. Only available on Linux with I2C support.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use robot_control::{Motor, MotorDriver, Robot, RobotConfig};
//! use std::sync::Arc;
//! use tokio::sync::Mutex;
//!
//! # async fn example() -> Result<(), robot_control::RobotError> {
//! // Use any MotorDriver implementation (mock for testing, Pca9685 for real hardware)
//! let driver: Arc<Mutex<dyn MotorDriver>> = todo!("create your driver");
//! let robot = Robot::new(driver, RobotConfig::default())?;
//! robot.drive(0.5, 0.5).await?;
//! robot.stop().await?;
//! robot.shutdown().await;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use Pca9685MotorBoard;
pub use ;