2 unstable releases
0.2.0 | Jan 20, 2022 |
---|---|
0.1.0 | May 6, 2021 |
#1110 in Embedded development
12KB
254 lines
TSL2591 driver
Check the examples folder for usage instructions.
lib.rs
:
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);
}
Dependencies
~120KB