Skip to main content

PyMindWave2

A Python package that simplifies connecting and gathering data from the Neurosky MindWave Mobile 2 EEG headset.

This package is made to ease the process of data collection and interfacing with the MindWave Mobile 2 EEG headset mainly for researchers and students who are interested in using the headset for their projects.

Note: This is an unofficial package and is not affiliated with Neurosky.

Features

  • Easy to use: Provides a simple and intuitive API to interact with the headset.
  • Data collection: Provides a way to manage data collection sessions with different configurations.
  • Event-driven: Allows you to register callbacks for different events to ease the process of handling data.
  • Built-in retry and timeout: Automatically retries to connect to the headset if the connection fails.
  • Fully documented: You don't know what a function does? Just check the documentation.

Installation

Prerequisites: Before installing the package, make sure to do the following:

  • Install the official NeuroSky ThinkGear Connector software on your computer. It enables communication between your computer and the headset through a serial port. You can download it from here. And make sure it's running in the background.

  • Pair the headset with your computer via Bluetooth. You can follow the instructions in NeuroSky's pairing guide.

Then you can install the package using pip:

pip install pymindwave2

Quick Start

A minimal example to start a data collection session:

from pymindwave2 import MindWaveMobile2, Session, SessionConfig

# Initialize and connect to the headset
headset = MindWaveMobile2()
success = headset.start(n_tries=5, timeout=30)

if success:  # if the headset is connected successfully
    # Create a session configuration
    sess_config = SessionConfig(
        user_name="Ahmed",
        ...  # other configurations
        classes=["left", "right"]
    )
    
    # Initialize and start the recording session
    session = Session(headset, config=sess_config)
    session.start()  # Start recording data
    
    while session.is_active:
        pass  # wait for the session to finish
    
    session.save()  # save the recorded data to disk

for more examples and detailed usage, check the Examples

Contributing

Feel free to contribute to this package to add, update, fix, and suggest other features.

Metadata

Release files for pymindwave2 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymindwave2 1.0.1
File Size Uploaded
pymindwave2-1.0.1.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymindwave2 1.0.1
File Interpreter ABI Platform
pymindwave2-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.5 kB

Release files / pymindwave2-1.0.1.tar.gz

Download URL pymindwave2-1.0.1.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6ed1f82458c777c02f0154e3f3cc2b4b082ae88fc566580a022939162792c3a3
BLAKE2b-256 checksum
How to use checksums
258f1511b7cc70b025b5de69d3f67b6c6061dc25494f3b28c05a6b60015239ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / pymindwave2-1.0.1-py3-none-any.whl

Download URL pymindwave2-1.0.1-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c12b416a30b4d36d6bfb875ce8022eee765947d4d71bbfd7e3a6b9bb68842651
BLAKE2b-256 checksum
How to use checksums
cbd24ef450d54e6e5201afb548e5feb988ec2be8d8aa2e110775e0951aa93aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page