[][src]Struct matrix_rhal::Sensors

pub struct Sensors<'a> {
    pub bus: &'a Bus,
}

Communicates with the main sensors on the MATRIX Creator.

Fields

bus: &'a Bus

Methods

impl<'a> Sensors<'a>[src]

pub fn new(bus: &Bus) -> Sensors[src]

Creates a new instance of Sensors.

pub fn read_uv(&self) -> f32[src]

Return the latest UV sensor value.

pub fn read_pressure(&self) -> Pressure[src]

Return the latest Pressure sensor values.

pub fn read_humidity(&self) -> Humidity[src]

Return the latest Humidity sensor values.

pub fn read_imu(&self) -> Imu[src]

Return the latest IMU sensor values.

Trait Implementations

impl<'a> Debug for Sensors<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Sensors<'a>

impl<'a> Send for Sensors<'a>

impl<'a> Sync for Sensors<'a>

impl<'a> Unpin for Sensors<'a>

impl<'a> UnwindSafe for Sensors<'a>

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, 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.