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§
sourcefn get_distance(&mut self) -> Result<f32, PeripheralError>
fn get_distance(&mut self) -> Result<f32, PeripheralError>
Measures the distance from the sensor to the nearest object.