Skip to main content

A Python package for seamless communication with Neurosky MindWave Mobile 2 headset.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymindwave2-1.0.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymindwave2-1.0.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file pymindwave2-1.0.1.tar.gz.

File metadata

  • Download URL: pymindwave2-1.0.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pymindwave2-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6ed1f82458c777c02f0154e3f3cc2b4b082ae88fc566580a022939162792c3a3
MD5 f1bd40bc1d2fd70d8776acbce455d284
BLAKE2b-256 258f1511b7cc70b025b5de69d3f67b6c6061dc25494f3b28c05a6b60015239ed

See more details on using hashes here.

File details

Details for the file pymindwave2-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pymindwave2-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pymindwave2-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c12b416a30b4d36d6bfb875ce8022eee765947d4d71bbfd7e3a6b9bb68842651
MD5 e43f8b8695740840c3b486bb1ee9b3cb
BLAKE2b-256 cbd24ef450d54e6e5201afb548e5feb988ec2be8d8aa2e110775e0951aa93aa4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page