Trait esp_ward::peripherals::DistanceSensor

source ·
pub trait DistanceSensor {
    // Required method
    fn get_distance(&mut self) -> Result<f32, PeripheralError>;
}
Expand description

Trait for peripherals that can measure distance.

Required Methods§

source

fn get_distance(&mut self) -> Result<f32, PeripheralError>

Measures the distance from the sensor to the nearest object.

Implementors§