Crates.io | tsl2591-eh-driver |
lib.rs | tsl2591-eh-driver |
version | 0.5.1 |
source | src |
created_at | 2023-07-07 16:06:50.907171 |
updated_at | 2024-09-17 14:08:59.613747 |
description | Rust embedded-hal driver for the TSL2591 Light Sensor |
homepage | https://gitlab.com/scrobotics/embedded-rs/tsl2591-rs/ |
repository | https://gitlab.com/scrobotics/embedded-rs/tsl2591-rs/ |
max_upload_size | |
id | 910909 |
size | 13,932 |
Forked from https://github.com/pcvonz/tsl2591-rs.
A WIP Rust implementation of the TSL2591 High Dynamic Range Digital Light Sensor.
Most of what's here is a straight port of the Adafruit C++ library.
t.enable().unwrap();
loop {
let (ch_0, ch_1) = t.get_channel_data().unwrap();
delay.delay_ms(200); // wait for sensor to integrate data
let d = t.calculate_lux(ch_0, ch_1).unwrap();
println!("Counts {}", d);
}
This tool is released under the MIT license, hence allowing commercial use of the library. Please refer to the LICENSE file.