A Rust embedded-hal device driver for the TSL2591 AMS Ambient Light Sensor. Most of what's here is a straight port of the Adafruit C++ library.
Please note the discussions regarding the lux equation: * https://github.com/adafruit/AdafruitTSL2591Library/issues/14 * https://github.com/adafruit/AdafruitCircuitPythonTSL2591/issues/7#issuecomment-466014157
Visit the manufacturer's documentation to obtain most accurate values.
rust
t.enable().unwrap();
loop {
let (ch_0, ch_1) = t.get_channel_data(&mut delay).unwrap();
let test = t.calculate_lux(ch_0, ch_1).unwrap();
}
Check the examples folder for usage instructions.
Licensed under either of:
at your option.