Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (9 sloc) 348 Bytes
extern crate linux_embedded_hal as hal;
extern crate veml6075;
use veml6075::{Calibration, Veml6075};
fn main() {
let dev = hal::I2cdev::new("/dev/i2c-1").unwrap();
let mut sensor = Veml6075::new(dev, Calibration::default());
let m = sensor.read().unwrap();
println!("UVA: {:2}, UVB: {:2}, UVI: {:2}", m.uva, m.uvb, m.uv_index);
}
You can’t perform that action at this time.