Jump to content

Exercise:Logging Devices: Difference between revisions

From BCI2000 Wiki
Jhill (talk | contribs)
No edit summary
Jhill (talk | contribs)
No edit summary
Line 6: Line 6:
# Edit your batch file such that the source module (in this case SignalGenerator) is started with the [[User Reference:Module Command Line Options|command-line option]] <code>--LogMouse=1</code>  
# Edit your batch file such that the source module (in this case SignalGenerator) is started with the [[User Reference:Module Command Line Options|command-line option]] <code>--LogMouse=1</code>  
# Relaunch BCI2000 using the updated batch file, and check the States again.  Note that there are now additional state variables, in accordance to what the [[User_Reference:Logging_Input|documentation on the mouse and joystick loggers]] tells us to expect.
# Relaunch BCI2000 using the updated batch file, and check the States again.  Note that there are now additional state variables, in accordance to what the [[User_Reference:Logging_Input|documentation on the mouse and joystick loggers]] tells us to expect.
# '''TODO''': Work out a way to visualize one's chosen state (ExpressionFilter + visualizationsMatlab, Python, ...)
 
What sorts of neuroscientific questions could you address, by recording signals from human-interface devices, synchronized in real-time to brain signal recordings?  What sort of experiments would you imagine doing?  Which state variables would be relevant, and how would you process them?
 
Now we need a way of visualizing the state variable(s) you find most interesting.  The exact way you do this may depend on the state you are interested in.  A simple preliminary way might be to use the shell in the ''MatlabSignalProcessing'' module to repeatedly examine the variable <code>bci_States</code> or similarly, <code>self.states</code> from the shell of one of the Python modules.  One of the most flexible ways would be to use, the [[ExpressionFilter]], which has been built into ''DummySignalProcessing'' for the purposes of the workshop: states can be drawn into the signal pipeline by entering their names into the '''Expressions''' parameter (found in the config dialog's '''Filtering''' tab).  This also allows you to view the signal, if you fill the '''VisualizeExpressionFilter''' checkbox in the '''Visualize''' tab.


The following devices are supported on the workshop installations.  You can log as many devices simultaneously as the CPU and number of available USB ports will allow (just keep appending the flags).  For whichever device(s) you choose, check to see which states are added.
The following devices are supported on the workshop installations.  You can log as many devices simultaneously as the CPU and number of available USB ports will allow (just keep appending the flags).  For whichever device(s) you choose, check to see which states are added.

Revision as of 23:48, 14 May 2011

  1. Copy one of the existing batch files and use it as a template to write your own batch file.
  2. In your new batch file, open the Operator, SignalGenerator, DummySignalProcessing and DummyApplication.
  3. Launch BCI2000 using your new batch file.
  4. In the Operator, open the View menu and select States.
  5. Note down the names of the state variables, then quit BCI2000 again.
  6. Edit your batch file such that the source module (in this case SignalGenerator) is started with the command-line option --LogMouse=1
  7. Relaunch BCI2000 using the updated batch file, and check the States again. Note that there are now additional state variables, in accordance to what the documentation on the mouse and joystick loggers tells us to expect.

What sorts of neuroscientific questions could you address, by recording signals from human-interface devices, synchronized in real-time to brain signal recordings? What sort of experiments would you imagine doing? Which state variables would be relevant, and how would you process them?

Now we need a way of visualizing the state variable(s) you find most interesting. The exact way you do this may depend on the state you are interested in. A simple preliminary way might be to use the shell in the MatlabSignalProcessing module to repeatedly examine the variable bci_States or similarly, self.states from the shell of one of the Python modules. One of the most flexible ways would be to use, the ExpressionFilter, which has been built into DummySignalProcessing for the purposes of the workshop: states can be drawn into the signal pipeline by entering their names into the Expressions parameter (found in the config dialog's Filtering tab). This also allows you to view the signal, if you fill the VisualizeExpressionFilter checkbox in the Visualize tab.

The following devices are supported on the workshop installations. You can log as many devices simultaneously as the CPU and number of available USB ports will allow (just keep appending the flags). For whichever device(s) you choose, check to see which states are added.

  • To log the mouse or trackpad, use --LogMouse=1
  • To log the joystick, use --LogJoystick=1
  • To log the 5DT Data Glove Ultra, use --LogDataGlove=1 . Please be gentle with the data glove.
  • To log the Nintendo Wiimote (support for which is currently still unofficial but will be released soon):
    1. Ensure that a Bluetooth dongle is attached.
    2. Press the (1) and (2) buttons simultaneously on the Wiimote. Lights will flash for several seconds, during which the Wiimote is receptive to pairing.
    3. Launch ConnectWiimotes.exe
    4. Wait for the program to find the Wiimote and pair with it.
    5. Since the Windows XP Bluetooth implementation is flaky, verify that the device is connected using the Start menu -> Control Panel -> Bluetooth Devices. You should see an entry for the Wiimote there: if it says "connected" underneath, connection has succeeded. If the word "connected" is absent, it has failed: close the control panel, re-run ConnectWiimote.exe, and re-open the control panel to verify. Repeat until it works.
    6. The Wiimote will now stay connected across multiple BCI2000 sessions, but there will be a constant drain on the batteries. Therefore, please disconnect it as soon as you are no longer using it (go to the control panel again, highlight the Wiimote and click "Remove").
    7. The flag you need when starting your source module is --LogWiimote=1

Support for the Tobii eyetracker will also be released soon.