LabStreamingLayer in MATLAB for BCILAB

I am working to get an LSL stream from my OpenBCI board into MATLAB so I can run BCILAB.

Specifications:
OSX High Sierra 10.13.6
Xcode 9.4.1 Build version 9F2000
Python 3.5.5 :: Anaconda, Inc.
MATLAB 2018a

I have the OpenBCI_LSL repository working at the moment and can start an LSL stream from there.

On the OpenBCI_MATLAB repository, it says it is currently deprecated, however I think it may still work. Need some clarification here

What would be the best way to go about this?

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Jeff, hi.

    From your previous posts, I understand that you have a Ganglion board, NOT Cyton. Is that correct?

    OpenBCI_LSL ONLY WORKS WITH CYTON. I've said this a few times on other threads. Do you understand what I'm saying and why that is? OpenBCI_LSL expects to read a Cyton data stream from a serial port. Neither of which applies to Ganglion. You keep posting information that indicates you are trying to use OpenBCI_LSL, and that only works WITH CYTON, not the Ganglion board that you have. 

    Your likely easiest route to creating an LSL stream for Ganglion, is to use the Networking widget in the OpenBCI_GUI. I've suggested this previously, did you try that?

    The LSL tutorials show how to consume an LSL stream from Matlab.


    However, note, in this thread, it is mentioned that the LSL output from OpenBCI_GUI may be buggy. But I have heard of other Ganglion users getting the LSL output to work.


    If you cannot get the GUI / Networking widget LSL output to work, you may have to use the OpenBCI_Python repo to create your LSL stream from the Ganglion. And that further requires that you run OpenBCI_Python on a Linux machine, due to details of the Bluetooth driver software. 

    Once you have created the LSL stream from the Ganglion, the tutorial should work,


    Regards,

    William


  • squadussquadus Los Angeles
    Hi William,

    Thank you for sharing these guides! They have been a huge help.

    I am at my University's MATLAB computer lab and after talking to a number of people, I have been getting more familiar with the "Open" part in OpenBCI =) Sorry about the confusion from before, I am just glad the Open BCI GUI has a robust LSL widget for non-technical nerds like me. I think it would be beneficial for all current and future users if the Open BCI GUI had its own section in the documentation, especially for networking, and maybe have it included with every board shipped??

    I compiled the lsl_loadlib in MATLAB by running the build_mex function. I just got the ReceiveData and vis_stream functions to run by compiling the .c code into mex from within the original liblsl-Matlab repository. Now I am working on getting Online Analysis > Read input from… > Lab streaming layer… to run in BCILAB.

  • wjcroftwjcroft Mount Shasta, CA
    edited September 2018
    Jeff, thanks.

    The GUI does have a docs page, but apparently does not include all the current widgets.


    The repo page,


    does mention a widget tutorial, but the link is broken. The actual tutorial is here,


    And the individual widget source files are named "W_*" in the source tree,


    Regards,

    William



Sign In or Register to comment.