FinalSpark-RS
FinalSpark-RS is a Rust library for live data recording from MEA (Microelectrode Array) devices. It enables real-time data acquisition and processing from MEA devices over a network connection.
Features
- Connects to an MEA server to retrieve live data
- Supports both single-sample and multi-sample data recording
- Uses
tokiofor asynchronous networking - Structured data output with timestamps and electrode readings
Installation
Add finalspark-rs to your Cargo.toml:
[]
= { = "https://github.com/maidenlabs/finalspark-rs.git" }
= { = "1.0", = ["full"] }
Usage
Basic Setup
use LiveMEA;
async
Recording Multiple Samples
use LiveMEA;
async
Data Structure
The LiveData struct contains:
timestamp: String in RFC3339 format representing when the sample was recordeddata: 2D vector containing electrode readings where:- First dimension: 32 electrodes
- Second dimension: 4096 samples per electrode
Dependencies
tokio- Async runtime and networkingserde&serde_json- Data serializationchrono- Timestamp handlingtokio-tungstenite- WebSocket communicationurl- URL parsing and handling
License
This project is licensed under the MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please submit an issue or pull request on GitHub.