| Crates.io | nsrt |
| lib.rs | nsrt |
| version | 0.1.0 |
| created_at | 2025-05-02 22:25:33.259688+00 |
| updated_at | 2025-05-02 22:25:33.259688+00 |
| description | A Rust driver for the NSRT_mk4 sound level meter |
| homepage | |
| repository | https://github.com/brandonweeks/nsrt |
| max_upload_size | |
| id | 1658272 |
| size | 337,393 |
A Rust driver for the NSRT_mk4 sound level meter from Convergence Instruments.
use nsrt::{NSRT, Weighting, SamplingFrequency};
fn main() -> nsrt::Result<()> {
// Connect to the device and configure it in a single chain
let mut nsrt = NSRT::open()?
.weighting(Weighting::A)?
.time_constant(1.0)?
.sampling_frequency(SamplingFrequency::Freq48kHz)?
.apply()?;
// Read measurements
let level = nsrt.read_level()?;
println!("Current sound level: {:.1} dBA", level);
Ok(())
}
See examples/simple_monitor.rs for a more complete example.