Giter VIP home page Giter VIP logo

mindwave-lsl's Introduction

mindwave-lsl

This tool is for Mindwave EEG products and it was tested with Mindwave Mobile 2. You can use it to take data from a ThinkGear Connecter service using telnet and output it in a Lab Streaming Layer (LSL) outlet.

It can connect to Mindwave headsets using mindwave-python/python-mindwave as a connector too. Furthermore, you can set --output to a directory or CSV file to output the data there.

This package is available through pip

pip install mindwavelsl
mindwavelsl

If pip doesn't work, run the following to clone the library and install the tool:

cd ~
git clone https://github.com/gmierz/mindwave-lsl
cd mindwave-lsl
py setup.py install 

Then, to run it you can call it through the command line:

mindwavelsl

It has multiple options available including file output, and a mindwave-python connection option:

usage: mindwavelsl [-h] [--no-lsl] [--output OUTPUT] [--host HOST]
                   [--port PORT] [--mindwave-python-connect] [--device DEVICE]
                   [--headset-id HEADSET_ID] [--no-open-serial]

Run this tool to push Mind Wave Mobile 2 data from the ThinkGear Connector
socket, to Lab Streaming Layer (LSL).

optional arguments:
  -h, --help            show this help message and exit
  --no-lsl              Set this flag to disable LSL outlet.
  --output OUTPUT       Path to output data to, can include a CSV filename.
  --host HOST           The host for the ThinkGear Connector.
  --port PORT           The port for the ThinkGear Connector.
  --mindwave-python-connect
                        Set this to connect to Mindwave headset using
                        mindwave-python (through the module `mindwave`). It
                        needs to be installed manually, and instructions can
                        be found here: https://github.com/BarkleyUS/mindwave-
                        python. A more up-to-date version exists here as well:
                        https://github.com/faturita/python-mindwave. Must set
                        --device and --headset-id to use.
  --device DEVICE       Set this to the device of the headset to record i.e.
                        /dev/tty.MindWave2.
  --headset-id HEADSET_ID
                        Set this to the headset-id of the headset to record.
  --no-open-serial      If set, then `open_serial` in mindwave.Headset will be
                        set to False.

You can also use it as a module:

from mindwavelsl import MindwaveLSL

mwlsl = MindwaveLSL('localhost', 13854)

# Setup the LSL outlet and the ThinkGear connection
mwlsl.setup()

# Run the service
mwlsl.run()

See how the TelnetConnector and MindwavePythonWrapper connectors are implemented to add other connection options.

mindwave-lsl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mindwave-lsl's Issues

Sampling rate detection issue in EEGLAB

When I record the data to xdf using neuropype and view it in EEGLAB, the sampling frequency reaches 1Hz, whereas Mindwave mobile 2 shows that the sampling frequency can go up to 512 Hz. Is there something I am missing here?

Only Raw EEG data getting captured.

Headers are written to the out put file. Only Raw EEG column is being captured. Rest of the data captured is NaN. I just used the command c:\ mindwavelsl --output sampleoutput.

Write to file when running as module

Hi

I'm trying to run this lib as a module and write the output to a file. Like this...

from mindwavelsl import MindwaveLSL

mwlsl = MindwaveLSL('localhost', 13854, './filename.csv')

# Setup the LSL outlet and the ThinkGear connection
mwlsl.setup()

# Run the service
mwlsl.run()

The header is written to the file but no data. Am I doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.