Expand description

A WIP rust implementation of the TSL2591 lux sensor Most of what’s here is a straight port of the Adafruit C++ library

  • Basic reading and lux calculation
  • Interrupt support

Example

t.enable().unwrap();
t.set_timing(None).unwrap();
t.set_gain(None).unwrap();
loop {
    let (ch_0, ch_1) = t.get_channel_data(&mut delay).unwrap();
    let test = t.calculate_lux(ch_0, ch_1).unwrap();
                                                                 
    iprintln!(&mut cp.ITM.stim[0], "{}", test);
                                                                 
}

Structs

Enums