Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Python3 library to read data from Neurosky Mindwave Mobile 2 on linux using pybluez2.

Contents:

Requirements

  • libbluetooth-dev

Pre-execution

You can install dependencies via setup.py

$ python -m pip install .
$ python -m pip install .[gui] # to install gui dependencies

via python package index (PyPI)

$ python -m pip install neuropy3
$ python -m pip install neuropy3[gui] # to install gui dependencies

or manually

$ python -m pip install -r requirements.txt
$ python -m pip install -r gui_requirements.txt # to install gui dependencies

Execution

Command line interface

$ python -m neuropy3
$ python -m neuropy3 --address XX:YY:ZZ:AA:BB:CC
$ python -m neuropy3 --help

Address argument helps speed up connection process, otherwise a neuropy3 will run a scan of nearby bluetooth devices (which takes a lot).

Graphical user interface

$ python -m neuropy3 --gui
$ python -m neuropy3 --address XX:YY:ZZ:AA:BB:CC --gui

Note: requires neuropy3[gui] extra dependencies

Screenshots
gui
raw

Importing library

>>> from neuropy3.neuropy3 import MindWave
>>> mw = MindWave(address='XX:YY:ZZ:AA:BB:CC', autostart=False, verbose=3)
>>> # mw = MindWave(autostart=False, verbose=3)  # Autoscan for MindWave Mobile
>>> mw.set_callback('eeg', lambda x: print(x))
>>> mw.set_callback('meditation', lambda x: print(x))
>>> mw.set_callback('attention', lambda x: print(x))
>>> mw.start()
>>> mw.unset_callback('eeg')
>>> mw.stop()

Acknowledgements

This work has been supported by National R&D Project TEC2017-84197-C4-1-R and by the Comunidad de Madrid project CYNAMON P2018/TCS-4566 and co-financed by European Structural Funds (ESF and FEDER)

License

neuropy3  Copyright (C) 2022-2024 Sergio Chica Manjarrez @ pervasive.it.uc3m.es.
Universidad Carlos III de Madrid.
This program comes with ABSOLUTELY NO WARRANTY; for details check below.
This is free software, and you are welcome to redistribute it
under certain conditions; check below for details.

LICENSE