How to use the brainflow.board_shim function in brainflow

To help you get started, we’ve selected a few brainflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Andrey1994 / brainflow / tests / python / brainflow_config_board.py View on Github external
params.serial_port = args.serial_port
    params.mac_address = args.mac_address
    params.other_info = args.other_info
    params.ip_address = args.ip_address
    params.ip_protocol = args.ip_protocol

    if (args.log):
        BoardShim.enable_dev_board_logger ()
    else:
        BoardShim.disable_board_logger ()

    board = BoardShim (args.board_id, params)
    board.prepare_session ()

    # disable 2nd channel for cyton use real board to check it, emulator ignores commands
    if args.board_id == brainflow.board_shim.BoardIds.CYTON_BOARD.value:
        board.config_board ('x2100000X')

    board.start_stream ()
    time.sleep (10)
    data = board.get_board_data ()
    board.stop_stream ()
    board.release_session ()

    print (data)
github Andrey1994 / brainflow / python-package / examples / ganglion_get_data.py View on Github external
def main ():
    parser = argparse.ArgumentParser ()
    parser.add_argument ('--port', type = str, help  = 'port name', default = None)
    parser.add_argument ('--log', action = 'store_true')
    args = parser.parse_args ()

    brainflow.board_shim.BoardShim.enable_dev_board_logger ()

    board = brainflow.board_shim.BoardShim (brainflow.board_shim.GANGLION.board_id, args.port)
    board.prepare_session ()
    board.start_stream ()
    time.sleep (5)
    board.stop_stream ()
    board.release_session ()
github Andrey1994 / brainflow / python-package / examples / ganglion_get_data.py View on Github external
def main ():
    parser = argparse.ArgumentParser ()
    parser.add_argument ('--port', type = str, help  = 'port name', default = None)
    parser.add_argument ('--log', action = 'store_true')
    args = parser.parse_args ()

    brainflow.board_shim.BoardShim.enable_dev_board_logger ()

    board = brainflow.board_shim.BoardShim (brainflow.board_shim.GANGLION.board_id, args.port)
    board.prepare_session ()
    board.start_stream ()
    time.sleep (5)
    board.stop_stream ()
    board.release_session ()