neurosky 0.0.1

Rust library and TUI for NeuroSky MindWave EEG headsets via the ThinkGear serial protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Example: scan for MindWave serial ports.
use neurosky::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
    env_logger::init();
    println!("Scanning for MindWave serial ports…");
    let ports = MindWaveDevice::find()?;
    if ports.is_empty() {
        println!("No MindWave device found.");
    } else {
        println!("Found {} port(s):", ports.len());
        for p in &ports { println!("  {}", p); }
    }
    Ok(())
}