tsl256x Light-To-Digital Converter

Platform agnostic driver for TSL256x series of light intensity sensors built using the embedded-hal
What works
- Getting raw sensor readings for both visible+IR spectrum and IR-only spectrum
- Using one of the three built in slave addresses, or any custom address
- Powering the chip on/off to conserve energy
- Setting sensor gain and integration time
TODO
- Add method to perform lux calculation (requires nostd implementation of exponentiation for f32)
- Add method to setup interrupts
- Support the TSL2560 (SPI version)
Example
extern crate tsl256x;
use ;
let sensor = new.unwrap;
sensor.power_on;
// Note sensor readings are zero until one integration period (default 400ms) after power on
iprintln!;
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.