[−][src]Struct mlx9061x::Mlx9061x
MLX90614/MLX90615 device driver
Implementations
impl<E, I2C> Mlx9061x<I2C, Mlx90614> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn new_mlx90614(
i2c: I2C,
address: SlaveAddr,
eeprom_write_delay_ms: u8
) -> Result<Self, Error<E>>
[src]
i2c: I2C,
address: SlaveAddr,
eeprom_write_delay_ms: u8
) -> Result<Self, Error<E>>
Create new instance of the MLX90614 device.
The slave address must match the address stored in the device EEPROM.
To change it you need to connect first and then change it with set_address()
.
An invalid alternative slave address will return Error::InvalidInputData
.
When writing to the EEPROM waiting a certain amount of time is necessary.
This delay is configured through the eeprom_write_delay_ms
parameter
in milliseconds.
pub fn ambient_temperature(&mut self) -> Result<f32, Error<E>>
[src]
Read the ambient temperature in celsius degrees
pub fn object1_temperature(&mut self) -> Result<f32, Error<E>>
[src]
Read the object 1 temperature in celsius degrees
pub fn object2_temperature(&mut self) -> Result<f32, Error<E>>
[src]
Read the object 2 temperature in celsius degrees
Note that this is only available in dual-zone thermopile device variants.
pub fn raw_ir_channel1(&mut self) -> Result<u16, Error<E>>
[src]
Read the channel 1 raw IR data
pub fn raw_ir_channel2(&mut self) -> Result<u16, Error<E>>
[src]
Read the channel 2 raw IR data
pub fn emissivity(&mut self) -> Result<f32, Error<E>>
[src]
Get emissivity epsilon
pub fn set_emissivity<D: DelayMs<u8>>(
&mut self,
epsilon: f32,
delay: &mut D
) -> Result<(), Error<E>>
[src]
&mut self,
epsilon: f32,
delay: &mut D
) -> Result<(), Error<E>>
Set emissivity epsilon [0.1-1.0]
Wrong values will return Error::InvalidInputData
.
pub fn device_id(&mut self) -> Result<u64, Error<E>>
[src]
Get the device ID
impl<E, I2C> Mlx9061x<I2C, Mlx90615> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn new_mlx90615(
i2c: I2C,
address: SlaveAddr,
eeprom_write_delay_ms: u8
) -> Result<Self, Error<E>>
[src]
i2c: I2C,
address: SlaveAddr,
eeprom_write_delay_ms: u8
) -> Result<Self, Error<E>>
Create new instance of the MLX90615 device.
The slave address must match the address stored in the device EEPROM.
To change it you need to connect first and then change it with set_address()
.
An invalid alternative slave address will return Error::InvalidInputData
.
When writing to the EEPROM waiting a certain amount of time is necessary.
This delay is configured through the eeprom_write_delay_ms
parameter
in milliseconds.
impl<E, I2C> Mlx9061x<I2C, Mlx90615> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn ambient_temperature(&mut self) -> Result<f32, Error<E>>
[src]
Read the ambient temperature in celsius degrees
pub fn object_temperature(&mut self) -> Result<f32, Error<E>>
[src]
Read the object temperature in celsius degrees
pub fn raw_ir(&mut self) -> Result<u16, Error<E>>
[src]
Read the raw IR data
pub fn emissivity(&mut self) -> Result<f32, Error<E>>
[src]
Get emissivity epsilon
pub fn set_emissivity<D: DelayMs<u8>>(
&mut self,
epsilon: f32,
delay: &mut D
) -> Result<(), Error<E>>
[src]
&mut self,
epsilon: f32,
delay: &mut D
) -> Result<(), Error<E>>
Set emissivity epsilon [0.0-1.0]
Wrong values will return Error::InvalidInputData
.
pub fn device_id(&mut self) -> Result<u32, Error<E>>
[src]
Get the device ID
impl<I2C, IC> Mlx9061x<I2C, IC>
[src]
impl<E, I2C> Mlx9061x<I2C, Mlx90614> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn set_address<D: DelayMs<u8>>(
&mut self,
address: SlaveAddr,
delay_ms: &mut D
) -> Result<(), Error<E>>
[src]
&mut self,
address: SlaveAddr,
delay_ms: &mut D
) -> Result<(), Error<E>>
Change the device address
The address will be stored in the EEPROM. The address will be first cleared, before the new one is written. After each write the configured delay will be waited.
impl<E, I2C> Mlx9061x<I2C, Mlx90615> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn set_address<D: DelayMs<u8>>(
&mut self,
address: SlaveAddr,
delay_ms: &mut D
) -> Result<(), Error<E>>
[src]
&mut self,
address: SlaveAddr,
delay_ms: &mut D
) -> Result<(), Error<E>>
Change the device address
The address will be stored in the EEPROM. The address will be first cleared, before the new one is written. After each write the configured delay will be waited.
Trait Implementations
Auto Trait Implementations
impl<I2C, IC> RefUnwindSafe for Mlx9061x<I2C, IC> where
I2C: RefUnwindSafe,
IC: RefUnwindSafe,
I2C: RefUnwindSafe,
IC: RefUnwindSafe,
impl<I2C, IC> Send for Mlx9061x<I2C, IC> where
I2C: Send,
IC: Send,
I2C: Send,
IC: Send,
impl<I2C, IC> Sync for Mlx9061x<I2C, IC> where
I2C: Sync,
IC: Sync,
I2C: Sync,
IC: Sync,
impl<I2C, IC> Unpin for Mlx9061x<I2C, IC> where
I2C: Unpin,
IC: Unpin,
I2C: Unpin,
IC: Unpin,
impl<I2C, IC> UnwindSafe for Mlx9061x<I2C, IC> where
I2C: UnwindSafe,
IC: UnwindSafe,
I2C: UnwindSafe,
IC: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,