OpenBCI_Python library: best practices for integrating custom BCI algorithms
I've been trying to write a program to manually label which waveforms are sad or happy since the OpenBCI GUI doesn't provide a simple way to add manual markers to the data. The source for it can be found here: manually_labeled_waveforms.py
What I should be expecting is a bunch of packets with varying labels next to them. Instead, I get an empty file and a bunch of messages along the line of "skipped packet with ID#".
I haven't been able to reproduce the same problem when I ran user.py in the OpenBCI_Python repo when I run the user.py file with these steps:
What I should be expecting is a bunch of packets with varying labels next to them. Instead, I get an empty file and a bunch of messages along the line of "skipped packet with ID#".
I haven't been able to reproduce the same problem when I ran user.py in the OpenBCI_Python repo when I run the user.py file with these steps:
- python2 user.py -p /dev/ttyUSB0 -a csv_collect
- Then in the program, type /start
- Wait for some data to come on. You will never see the message, "I skipped packet with ID#" over and over again no matter what you do.
- Then type /stop
- Then type /exit
- You should get a csv file filled with EEG data
What'm I doing wrong with invoking the library to connect to the board in my program? I decided to try writing a python program to handle classifying the EEG waveforms as a fallback since the project is in a time crunch.
Comments
I'm not directly answering your Python library question. But there is another way to record timing mark data along with an EEG stream, using the LSL 'apps' LabRecorder and Keyboard. The resulting combined streams are then recorded into an XDF file by LabRecorder.
http://code.google.com/p/labstreaminglayer/wiki/LabRecorder
http://code.google.com/p/labstreaminglayer/
https://github.com/dmedine/labstreaminglayer/ (migration to GitHub by UCSD)
http://code.google.com/p/labstreaminglayer/wiki/TimeSynchronization
http://openbci.com/forum/index.php?p=/discussion/334/labstreaminglayer-into-bcilab-eeglab-matlab
I have not used this myself, but it is being used in many other BCI lab settings.
----
Jeremy @jfrey or Rodrigo @Rceballos98 , may have more comments on your library question.
William
http://linuxgizmos.com/ringing-in-2015-with-40-linux-friendly-hacker-sbcs/
In other words, instead of trying to chop out sections of the OpenBCI Python tree... Just use the whole tree and incorporate your mods as additions to the data flow already there. The user.py may be setting up the environment for the rest of the library to work.
http://openbci.com/forum/index.php?p=/discussion/233/github-com-openbci-python
William
http://openbci.com/forum/index.php?p=/discussion/233/github-com-openbci-python
If you use the Search box in the right column for 'P300' you can see some other threads; Jeremy @jfrey has done a OpenViBE tutorial, etc.