Crates.io | ruuvi_reader |
lib.rs | ruuvi_reader |
version | 0.1.0 |
source | src |
created_at | 2020-12-25 14:50:45.854278 |
updated_at | 2020-12-25 14:50:45.854278 |
description | A library to collect sensory data from RuuviTag sensors. |
homepage | |
repository | https://github.com/ollipa/ruuvi_reader |
max_upload_size | |
id | 327188 |
size | 32,818 |
A library to collect sensory data from RuuviTag sensors using Bluetooth LE. In practice just a convenience wrapper over btleplug
and ruuvi_sensor_protocol
crates.
A minimal example to scan sensory data and print it to stdout.
use ruuvi_reader::BleAdapter;
fn main() {
let adapter = BleAdapter::connect().unwrap();
let results = adapter.start_scan().unwrap();
for result in results {
match result {
Ok(data) => println!("{:?}", data),
Err(err) => eprintln!("{}", err),
}
}
}