<!-- Intro -->
# PyMindWave2
A Python package that simplifies connecting and gathering data from the [Neurosky MindWave Mobile 2](https://store.neurosky.com/pages/mindwave) 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.
<u>**Note:** This is an unofficial package and is not affiliated with [Neurosky](https://neurosky.com/).</u>
<!-- Features -->
## 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 -->
## Installation
**Prerequisites: Before installing the package, make sure to do the following:**
- Install the official NeuroSky [ThinkGear Connector](http://support.neurosky.com/kb/applications/what-is-the-thinkgear-connector-and-why-do-i-need-it) software on your computer. It enables communication between your computer and the headset through a serial port.
You can download it from [here](https://download.neurosky.com/public/Products/Utility/TGC/). 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](http://support.neurosky.com/kb/mindwave-mobile-2/cant-pair-mindwave-mobile-2-with-computer-or-mobile-device).
Then you can install the package using pip:
```bash
pip install pymindwave2
```
<!-- Usage -->
## Quick Start
A minimal example to start a data collection session:
```py
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](https://princeegy.github.io/pymindwave2/examples)
<!-- Contributing -->
## Contributing
Feel free to contribute to this package to add, update, fix, and suggest other features.
Raw data
{
"_id": null,
"home_page": null,
"name": "pymindwave2",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "bci, brain-computer interface, brainwaves, eeg, headset, mind control, mindwave, mindwave mobile, mindwave mobile 2, mindwavemobile, mindwavemobile2, motor imagery, neuroscience, neurosky",
"author": null,
"author_email": "Ahmed Mohsen <ahmed25004@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/25/8f/1511b7cc70b025b5de69d3f67b6c6061dc25494f3b28c05a6b60015239ed/pymindwave2-1.0.1.tar.gz",
"platform": null,
"description": "<!-- Intro -->\r\n# PyMindWave2\r\n\r\n\r\nA Python package that simplifies connecting and gathering data from the [Neurosky MindWave Mobile 2](https://store.neurosky.com/pages/mindwave) EEG headset.\r\n\r\nThis 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.\r\n\r\n<u>**Note:** This is an unofficial package and is not affiliated with [Neurosky](https://neurosky.com/).</u>\r\n\r\n<!-- Features -->\r\n## Features\r\n\r\n- **Easy to use**: Provides a simple and intuitive API to interact with the headset.\r\n- **Data collection**: Provides a way to manage data collection sessions with different configurations.\r\n- **Event-driven**: Allows you to register callbacks for different events to ease the process of handling data.\r\n- **Built-in retry and timeout**: Automatically retries to connect to the headset if the connection fails.\r\n- **Fully documented**: You don't know what a function does? Just check the documentation.\r\n\r\n<!-- Installation -->\r\n## Installation\r\n\r\n**Prerequisites: Before installing the package, make sure to do the following:**\r\n\r\n- Install the official NeuroSky [ThinkGear Connector](http://support.neurosky.com/kb/applications/what-is-the-thinkgear-connector-and-why-do-i-need-it) software on your computer. It enables communication between your computer and the headset through a serial port.\r\nYou can download it from [here](https://download.neurosky.com/public/Products/Utility/TGC/). And make sure it's running in the background.\r\n\r\n- Pair the headset with your computer via Bluetooth. You can follow the instructions in [NeuroSky's pairing guide](http://support.neurosky.com/kb/mindwave-mobile-2/cant-pair-mindwave-mobile-2-with-computer-or-mobile-device).\r\n\r\nThen you can install the package using pip:\r\n\r\n```bash\r\npip install pymindwave2\r\n```\r\n\r\n<!-- Usage -->\r\n## Quick Start\r\n\r\n\r\nA minimal example to start a data collection session:\r\n```py\r\nfrom pymindwave2 import MindWaveMobile2, Session, SessionConfig\r\n\r\n# Initialize and connect to the headset\r\nheadset = MindWaveMobile2()\r\nsuccess = headset.start(n_tries=5, timeout=30)\r\n\r\nif success: # if the headset is connected successfully\r\n # Create a session configuration\r\n sess_config = SessionConfig(\r\n user_name=\"Ahmed\",\r\n ... # other configurations\r\n classes=[\"left\", \"right\"]\r\n )\r\n \r\n # Initialize and start the recording session\r\n session = Session(headset, config=sess_config)\r\n session.start() # Start recording data\r\n \r\n while session.is_active:\r\n pass # wait for the session to finish\r\n \r\n session.save() # save the recorded data to disk\r\n```\r\n\r\nfor more examples and detailed usage, check the [Examples](https://princeegy.github.io/pymindwave2/examples)\r\n\r\n<!-- Contributing -->\r\n## Contributing\r\nFeel free to contribute to this package to add, update, fix, and suggest other features.\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for seamless communication with Neurosky MindWave Mobile 2 headset.",
"version": "1.0.1",
"project_urls": {
"Documentation": "https://princeegy.github.io/pymindwave2/",
"Homepage": "https://github.com/PrinceEGY/pymindwave2",
"Issues": "https://github.com/PrinceEGY/pymindwave2/issues"
},
"split_keywords": [
"bci",
" brain-computer interface",
" brainwaves",
" eeg",
" headset",
" mind control",
" mindwave",
" mindwave mobile",
" mindwave mobile 2",
" mindwavemobile",
" mindwavemobile2",
" motor imagery",
" neuroscience",
" neurosky"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cbd24ef450d54e6e5201afb548e5feb988ec2be8d8aa2e110775e0951aa93aa4",
"md5": "e43f8b8695740840c3b486bb1ee9b3cb",
"sha256": "c12b416a30b4d36d6bfb875ce8022eee765947d4d71bbfd7e3a6b9bb68842651"
},
"downloads": -1,
"filename": "pymindwave2-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e43f8b8695740840c3b486bb1ee9b3cb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 21375,
"upload_time": "2025-01-12T13:26:46",
"upload_time_iso_8601": "2025-01-12T13:26:46.495106Z",
"url": "https://files.pythonhosted.org/packages/cb/d2/4ef450d54e6e5201afb548e5feb988ec2be8d8aa2e110775e0951aa93aa4/pymindwave2-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "258f1511b7cc70b025b5de69d3f67b6c6061dc25494f3b28c05a6b60015239ed",
"md5": "f1bd40bc1d2fd70d8776acbce455d284",
"sha256": "6ed1f82458c777c02f0154e3f3cc2b4b082ae88fc566580a022939162792c3a3"
},
"downloads": -1,
"filename": "pymindwave2-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "f1bd40bc1d2fd70d8776acbce455d284",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 21129,
"upload_time": "2025-01-12T13:26:51",
"upload_time_iso_8601": "2025-01-12T13:26:51.381770Z",
"url": "https://files.pythonhosted.org/packages/25/8f/1511b7cc70b025b5de69d3f67b6c6061dc25494f3b28c05a6b60015239ed/pymindwave2-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 13:26:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PrinceEGY",
"github_project": "pymindwave2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pymindwave2"
}