Jump to content

User Tutorial:BCI2000Remote

From BCI2000 Wiki
Revision as of 19:28, 14 September 2021 by Nluczak (talk | contribs) (Created page with "==Description== BCI2000Remote is a proxy interface class to the BCI2000 Operator module, and allows to start up, configure, and control BCI2000 from other applications. Intern...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

BCI2000Remote is a proxy interface class to the BCI2000 Operator module, and allows to start up, configure, and control BCI2000 from other applications. Internally, it maintains a telnet connection to the Operator module, and sends Operator Scripting commands to control it. However, no knowledge of these scripting commands is required in order to use the BCI2000Remote class from your own application.

BCI2000Remote is most useful when writing applications in C++, or in another language for which bindings to the BCI2000RemoteLib library exist, such as Python, or MATLAB.

Tutorial

  1. Download the PsychoPy standalone version from the PsychoPy downloads page.
  2. Copy the folders BCIStart and BCIUpdateState from the src/contrib/PsychoPy Components directory of your BCI2000 repository into the folder {$PsychoPyHome}\Lib\site-packages\psychopy\experiment\components
  3. Open PsychoPy and then open your experiment file (StroopExtended is what we use in the demo)
  4. Open the part of the experiment where you want to start BCI2000 (in this case the instruct tab) and look under the custom section of the components for the BCI Connect and BCI Update State components
  5. Add the BCI2000 Start Component by clicking on it.
  6. Enter the path to the prog folder in the BCI2000 directory where your BCI2000Remote.py file exists
  7. Add the states that you want to record separated by commas (the first value will always be the default value and the second value will always be the maximum value)
  8. Add the BCIUpdateState component to where you want to update state values. You can either choose to simply pass a variable through BCIUpdateState, or you can specify that it execute a specific Python script by choosing the "Use Expression" ticker
  9. Run the experiment

Video

Also see the PsychoPy page for more details on the installation process, APIs, and hooks.


See also