streaming Ganglion through Brainflow to MATLAB [resolved]

edited June 2020 in Software

Hello
I am currently trying to set up Brainflow in MATLAB to receive data from the Ganglion board. I am using this piece of code from the sample code in the docs:

BoardShim.set_log_file ('brainflow.log');
BoardShim.enable_dev_board_logger ();

params = BrainFlowInputParams ();
board_shim = BoardShim (int32 (BoardIDs.SYNTHETIC_BOARD), params);
board_shim.prepare_session ();
board_shim.start_stream (45000, '');
pause (5);
board_shim.stop_stream ();
data = board_shim.get_current_board_data (10);
disp (data);
board_shim.release_session ();

I have done all the previous steps in the docs such as compiling the core module and adding the folders to the path. I tested the code which is currently set up to use the synthetic board and it works perfectly.

My question is how to set up the code for the Ganglion board. I'm aware I need to input the Board ID and serial port for the dongle but I am unsure where to input this into the code. I've read through the docs but I am unsure on what I need to type into the code to get it set up.

Some help on this would be appreciated.

Thank you

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Mentioning Andrey Parfenov, @Andrey1994.

  • you can use other languages as a reference(python for example)
    it should look like:

    params = BrainFlowInputParams ();
    params.serial_port = 'COM3'; #for example
    params.mac_address = 'smth here'; #its optional if you have 1 ganglion skip it
    board_shim = BoardShim (int32 (BoardIDs.GANGLION_BOARD), params);
    

    Important: use ' instead "

  • edited June 2020

    Thank you!! Thats great! All is working now

Sign In or Register to comment.