Struct ev3dev_lang_rust::sensors::IrSeekerSensor[][src]

pub struct IrSeekerSensor { /* fields omitted */ }

HiTechnic EV3 / NXT Infrared Sensor.

Implementations

impl IrSeekerSensor[src]

pub fn get(port: SensorPort) -> Ev3Result<Self>[src]

Try to get a Self on the given port. Returns None if port is not used or another device is connected.

pub fn find() -> Ev3Result<Self>[src]

Try to find a Self. Only returns a motor if their is exactly one connected, Error::NotFound otherwise.

pub fn list() -> Ev3Result<Vec<Self>>[src]

Extract list of connected 'Self'

pub const MODE_AC: &'static str[src]

Sensor mode alternating current -> filters the infrared signal of the hitechnic ball -> only shows direction

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

Sensor mode alternating current -> filters the infrared signal of the hitechnic ball -> only shows direction

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

Sensor mode alternating current -> filters the infrared signal of the hitechnic ball -> only shows direction

pub const MODE_DC: &'static str[src]

Sensor mode direct current -> reacts on all infrared signals, sun infrared signal included -> only shows direction

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

Sensor mode direct current -> reacts on all infrared signals, sun infrared signal included -> only shows direction

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

Sensor mode direct current -> reacts on all infrared signals, sun infrared signal included -> only shows direction

pub const MODE_AC_ALL: &'static str[src]

Sensor mode alternating current -> shows direction (value0) and values of each of the five sensors

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

Sensor mode alternating current -> shows direction (value0) and values of each of the five sensors

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

Sensor mode alternating current -> shows direction (value0) and values of each of the five sensors

pub const MODE_DC_ALL: &'static str[src]

Sensor mode direct current -> shows direction (value0) and values of each of the five sensors

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

Sensor mode direct current -> shows direction (value0) and values of each of the five sensors

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

Sensor mode direct current -> shows direction (value0) and values of each of the five sensors

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

gets direction of incoming ir light (calculated by the sensor)

pub fn get_raw_values(&self) -> Ev3Result<[i32; 5]>[src]

gets the values of the five sensors of the HiTechnic IR Seeker (only works if dc_all or ac_all mode is activated)

Trait Implementations

impl Clone for IrSeekerSensor[src]

impl Debug for IrSeekerSensor[src]

impl Device for IrSeekerSensor[src]

impl Sensor for IrSeekerSensor[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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 = Infallible

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.