Expand description
A Rust library for recording live data from MEA (Microelectrode Array) devices.
This crate provides functionality to connect to and record data from MEA devices through a WebSocket connection. It supports both single and multiple sample recordings.
§Example
use finalspark_rs::LiveMEA;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mea = LiveMEA::new();
// Record a single sample from MEA device 1
let sample = mea.record_sample(1).await?;
println!("Recorded {} electrodes", sample.data.len());
// Record multiple samples
let samples = mea.record_n_samples(1, 3).await?;
println!("Recorded {} samples", samples.len());
Ok(())
}