Crate tsl2591[−][src]
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
Driver | |
Enable | |
Status |
Enums
Error | |
Gain | |
IntegrationTimes | |
Mode |