[][src]Struct ev3dev_lang_rust::sensors::ultrasonic_sensor::UltrasonicSensor

pub struct UltrasonicSensor { /* fields omitted */ }

LEGO EV3 ultrasonic sensor.

Methods

impl UltrasonicSensor[src]

pub fn set_mode_us_dist_cm(&self) -> Ev3Result<()>[src]

Continuous measurement - sets LEDs on, steady. Units in centimeters. Distance (0-2550)

pub fn set_mode_us_dist_in(&self) -> Ev3Result<()>[src]

Continuous measurement - sets LEDs on, steady. Units in inches. Distance (0-1003)

pub fn set_mode_us_listen(&self) -> Ev3Result<()>[src]

Listen - sets LEDs on, blinking. Presence (0-1)

pub fn set_mode_us_si_cm(&self) -> Ev3Result<()>[src]

Single measurement - LEDs on momentarily when mode is set, then off. Units in centimeters. Distance (0-2550)

pub fn set_mode_us_si_in(&self) -> Ev3Result<()>[src]

Single measurement - LEDs on momentarily when mode is set, then off. Units in inches. Distance (0-1003)

pub fn set_mode_us_dc_cm(&self) -> Ev3Result<()>[src]

??? - sets LEDs on, steady . Units in centimeters. Distance (0-2550)

pub fn set_mode_us_dc_in(&self) -> Ev3Result<()>[src]

??? - sets LEDs on, steady . Units in inches. Distance (0-1003)

pub fn get_distance(&self) -> Ev3Result<i32>[src]

Measurement of the distance detected by the sensor

Trait Implementations

impl Device for UltrasonicSensor[src]

impl Findable<SensorPort> for UltrasonicSensor[src]

impl Sensor for UltrasonicSensor[src]

impl Clone for UltrasonicSensor[src]

impl Debug for UltrasonicSensor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]