tmp102 1.0.0

Driver for the Texas Instruments TMP102 digital temperature senor (for Linux)
Documentation
1
2
3
4
5
6
7
8
9
extern crate tmp102;

use tmp102::{TMP102, TempScale};

fn main() {
    // address 0x48 assumes ADR0 is connected to GND
    let mut tmp = TMP102::new("/dev/i2c-1", 0x48).unwrap();
    println!("Temperature is {}", tmp.read(TempScale::Fahrenheit).unwrap());
}