[−][src]Struct ufire_sht20::SHT20
Methods
impl SHT20
[src]
pub fn new(filename: &'static str) -> Result<Self, Box<LinuxI2CError>>
[src]
Create a new SHT20 object
Pass the i2c port to use.
Example
let mut sht20 = SHT20::new("/dev/i2c-3").unwrap();
pub fn temperature(&mut self) -> Result<f32, Box<LinuxI2CError>>
[src]
Start a temperature measurement
Example
let mut sht20 = SHT20::new("/dev/i2c-3").unwrap(); let temp:f32 = sht20.temperature().unwrap();
pub fn humidity(&mut self) -> Result<f32, Box<LinuxI2CError>>
[src]
Start a humidity measurement
Example
let mut sht20 = SHT20::new("/dev/i2c-3").unwrap(); let hum:f32 = sht20.humidity().unwrap();
pub fn _reset(&mut self) -> Result<(), Box<LinuxI2CError>>
[src]
pub fn _write_register(
&mut self,
register: u8,
f_val: f32
) -> Result<(), Box<LinuxI2CError>>
[src]
&mut self,
register: u8,
f_val: f32
) -> Result<(), Box<LinuxI2CError>>
pub fn _read_register(
&mut self,
register: u8
) -> Result<f32, Box<LinuxI2CError>>
[src]
&mut self,
register: u8
) -> Result<f32, Box<LinuxI2CError>>
pub fn _change_register(
&mut self,
register: u8
) -> Result<(), Box<LinuxI2CError>>
[src]
&mut self,
register: u8
) -> Result<(), Box<LinuxI2CError>>
Auto Trait Implementations
impl Send for SHT20
impl Unpin for SHT20
impl Sync for SHT20
impl UnwindSafe for SHT20
impl RefUnwindSafe for SHT20
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,