Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (13 sloc) 389 Bytes
extern crate linux_embedded_hal as hal;
extern crate veml6030;
use veml6030::{SlaveAddr, Veml6030};
fn main() {
let dev = hal::I2cdev::new("/dev/i2c-1").unwrap();
let address = SlaveAddr::default();
let mut sensor = Veml6030::new(dev, address);
loop {
let lux = sensor.read_lux().unwrap();
println!("lux: {:2}", lux);
You can’t perform that action at this time.