LabStreamingLayer (LSL) stream from OpenBCI - Here's how
This answer is due to JFrey and others, but since the pieces are scattered around, I thought I'd post the solution in its own thread for clarity. This uses the OpenBCI and LSL Python libraries, so requires some basic python execution know-how (adding packages and executing code). It assumes you've already setup your OpenBCI hardware from the Getting Started guide.
- Download the OpenBCI Python code here: https://github.com/OpenBCI/OpenBCI_Python
- Download the LSL Python library: https://github.com/sccn/labstreaminglayer/tree/master/LSL/liblsl-Python. You may have to download the .zip of the whole project from here: https://github.com/sccn/labstreaminglayer
- Plug in the USB dongle of OpenBCI and turn it on. Find its port number.
- Windows: As in the Getting Started guide, open an OpenBCI .pde processing script, push the play button, and then in the window that opens select “LIVE” as the data source. The first COM choice in the list that appears should be the OpenBCI dongle’s.
- In your python environment, install the packages that user.py (from the OpenBCI python repo) needs, as well as the liblsl-python package.
- If you are on Windows, and your OpenBCI USB is registering as e.g. COM1, then run user.py from the OpenBCI python code with parameters as follows: python user.py -p=COM1 --add streamer_lsl
- If that succeeds, you should get a message similar to:
-------INSTANTIATING BOARD-------
Connecting to V3 at port COM13
Serial established...
....more text ....
--> - At that prompt, enter the command: /start
This starts two LSL streams, named "OpenBCI_EEG" and "OpenBCI_AUX", at least on my system. You can view them with Stream Viewer, which is an app within the overall LSL repo.
Comments
http://docs.openbci.com/research tools/
If for example Rodrigo @Rceballos98 sees your post.
The other LSL thread is here,
http://openbci.com/forum/index.php?p=/discussion/334/labstreaminglayer-into-bcilab-eeglab-matlab
Also see,
https://www.google.com/search?q=python+pip
William
- Now, you need to install the following packages using these commands:
PySide: "pip install pyside"yapsy: "pip install yapsy"
pylsl: "pip install pylsl"
pyserial: "pip install pyserial"
numpy: "pip install numpy" (Note: this might take longer time to be installed than other packages)
http://openbci.com/forum/index.php?p=/discussion/730/parsing-openbci-data-stream-using-c
Is the revised firmware interrupt based, as mentioned on previous threads here?
Regards,