A Rust library for parsing raw EmotiBit data.
EmotiBit is a wearable sensor module for capturing high-quality emotional, physiological, and movement data. Easy-to-use and scientifically-validated sensing lets you enjoy wireless data streaming to any platform or direct data recording to the built-in SD card.
Add the following line to your Cargo.toml file.
emotibit-data = "0.1"
Transform a single CSV line to DataPacket
.
```rust use emotibit_data::types::DataPacket;
fn main() {
let csvstr = "1126349,49106,10,PI,1,100,156593,156471,156372,156300,156205,156136,156130,156103,156051,156103";
match TryInto::
Read a CSV file and populate DataPacket
s.
```rust use anyhow::Result; use emotibit_data::{parser, types::DataPacket};
fn main() {
let filepath = "rawdata.csv";
let result: Vec
for packet in data_packets {
println!("{:?}", packet.unwrap());
}
for error in errors {
println!("{:?}", error);
}
} ```
There are more examples in the examples folder.