the question about connecting the bci2000 to the ardunio

Forum for discussion on different signal processing algorithms
summersun
Posts: 14
Joined: 04 May 2015, 21:56

the question about connecting the bci2000 to the ardunio

Post by summersun » 13 Aug 2015, 01:43

Dear all
my project aim is to utilize BCI2000, to develop and control a robotic limb support system for the stroke patients.
i used the arduino in the hardware part , and i did the signal processing in the BCI2000,
----but i do not know how to connect the BCI2000 to the hardware part (ardunio) to control the applicator?
Is there someone know how to solve this, thanks you very much !!!!!!!!
Thanks again!!

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: the question about connecting the bci2000 to the ardunio

Post by pbrunner » 13 Aug 2015, 10:01

Summersun,

two avenues to facilitate your robotic arm control:

1) Use the BCI2000 AppConnector to stream the output of the BCI2000 signal processing to your Adruino over UDP.
http://www.bci2000.org/wiki/index.php/T ... _Connector

2) Use the BCI2000 ParallelPortFilter to directly control the robotic arm over a PCI-based parallel port.
http://bci2000.org/wiki/index.php/Contr ... PortFilter

Regards, Peter

summersun
Posts: 14
Joined: 04 May 2015, 21:56

Re: the question about connecting the bci2000 to the ardunio

Post by summersun » 13 Aug 2015, 21:53

Peter,
First, thank you very much and my partner will try-----
and for my part,now I want to program in the Emotiv source module --I want to remark the state of the object move his hand or rest his hand, for example, I want to write the code is equal to 1 when the subject move his hand and write the code is equal to 0 when the subject rest his hand, and mark 0 or 1 to the raw EEG signals and make sure the fluctuation of the signal is corresponding to the state of the motion(this part is not the signal processing ,it is just the part of trigger of the offline analysis ), and when I made a correct mark, I will give these marked raw EEG signals to my partner to do the signal processing like feature classification-----
so are there any instructions for coding in the Emotiv source module ?
Thank you very much!!!!!!!!
summer

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: the question about connecting the bci2000 to the ardunio

Post by pbrunner » 13 Aug 2015, 22:06

Summersun,

I am not sure I correctly understand your question, but here are a few answers:

1) You probably will never need to program within a source module in BCI2000. Rather than that you can create your own signal processing or application module, or if the events that you handle are not synchronous to BCI2000, a logger. To get started, I would recommend to do the BCI2000 exercises [1]. They are fairly easy while giving you a sense of how to approach your problem in BCI2000.

2) If you are using the StimulusPresentation application module then you already have the state StimulusCode that corresponds to the current Stimulus on the screen. This State along with the output of your signal processing chain is also transmitted over the UDP socket in the AppConnector.

3) If you want to sync some external event, e.g,. the position of the robotic arm, you can either also do this on your Adruino sending the arm position into a BCI2000 state over the AppConnector protocol. Alternatively you can also use the ParallelPort filter to read these information from a PCI-based parallel port.

4) All states and signals are stored in the BCI2000 data file. For offline processing, you can either use the FilePlayback source module or the offline filters to send the data through your filter chain and export the filter output to MATALB.

Regards, Peter

[1] http://www.bci2000.org/wiki/index.php/P ... #Exercises

summersun
Posts: 14
Joined: 04 May 2015, 21:56

Re: the question about connecting the bci2000 to the ardunio

Post by summersun » 20 Aug 2015, 00:13

Dear pbrunner
thanks your reply, and there one thing i confused, APP connector and the application module is the same thing?
Thanks .

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: the question about connecting the bci2000 to the ardunio

Post by pbrunner » 20 Aug 2015, 15:50

Summersun,

the BCI2000 App Connector provides access to the states and control signals. If you plan to have to your application being outside of BCI2000, you will still need to have a BCI2000 application module running, even if it is the DummyApplication that does nothing.

Regards, Peter

[1] http://www.bci2000.org/wiki/index.php/T ... _Connector

summersun
Posts: 14
Joined: 04 May 2015, 21:56

Re: the question about connecting the bci2000 to the ardunio

Post by summersun » 26 Aug 2015, 01:07

Dear pbrunner
thanks for your reply, there is a another question : how can i run the APPConnector Example? should i need to download the other software like Qt4 and MinGW (i saw these in the AppConnectorExample.pdf in in the bci2000, and in the PDF, the download link for the Qt is not working,can you give me another website link for download Qt and MinGw?)
can you give the detailed instruction about how to run the AppConnector Example in the BCI2000 or is it can run in the bci2000 ?( cause i saw in the bci2000, the APPConnectorExample is a TEX File)

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: the question about connecting the bci2000 to the ardunio

Post by pbrunner » 26 Aug 2015, 16:25

Summersun,

the AppConnectorExample in the folder "BCI2000/src/contrib/AppConnectorApplications/AppConnectorExample" can be compiled directly in Qt. All you need to do is to download Qt4 or Qt5 and open the AppConnectorExample.pro file and hit compile.

Regards, Peter

summersun
Posts: 14
Joined: 04 May 2015, 21:56

Re: the question about connecting the bci2000 to the ardunio

Post by summersun » 01 Sep 2015, 05:43

Dear pbrunner
thanks for your reply , now i have installed the qt5, but when i run the APPConnectorExample.pro in the Qt, the issues shows::-1: error: dependent '..\..\..\shared\utils\SockStream.h' does not exist. but i have found the SockStream.h in my bci2000/src/shared/utils/lib , and i opened the SockStream in the Qt and run again the APPConnectorExample.pro ,but issues also shows the same, and in the bci wiki http://www.bci2000.org/wiki/index.php/T ... _Connector ,it wrote i need to add src/shared/utils/SockStream.cpp to my project to build the example program? and i am not very understand this means, first, just i mentioned, i have opened it in the bci2000 before run the APPConnectorExample.pro. and is it mean i should copy it to the AppconnectorExample.pro ( actually, i have tried this method, but still not working),
so could you please give me some instruction for solving this issues, cause i am really new in the Qt, thank you very much !!!
summer

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: the question about connecting the bci2000 to the ardunio

Post by pbrunner » 01 Sep 2015, 10:06

Summersun,

thank you for your reporting this issue. I have fixed the issue in SVN revision #4990. Please update your BCI2000 SVN trunk to the latest revision and report back whether this fixes your issue.

Regards, Peter

summersun
Posts: 14
Joined: 04 May 2015, 21:56

Re: the question about connecting the bci2000 to the ardunio

Post by summersun » 02 Sep 2015, 00:47

hi phrunner
i have update my bci2000 to the latest revision in Svn #4993 ,but still show the same issues and i really want to upload the picture of my Qt interface ,but when i add the attachment the website will jump to a blank website and wrote this can nor be dispaly
ps: i just open the AppConnectorExample.pro in the Qt and run it and i did not doing any change in the AppConnectorExample.pro is it right?

summersun
Posts: 14
Joined: 04 May 2015, 21:56

Re: the question about connecting the bci2000 to the ardunio

Post by summersun » 02 Sep 2015, 00:50

hi phrunner , this is my attachment
Attachments
Untitled.png

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: the question about connecting the bci2000 to the ardunio

Post by pbrunner » 02 Sep 2015, 11:01

Summersun,

I do not see the error message in your screenshot. To build the AppConnectorExample.exe you have two options:

(1) Using your own Qt5 installation and Qt Creator: First make sure that you delete any previously created "build-AppConnectorExample-Desktop*" folder. Then open the AppConnectorExample.pro file in Qt Creator and press "Configure Project". Then hit the green play button to compile and start the AppConnectorExample.

(2) Using the BCI2000 Qt installation and MS Visual Studio 2012: Install MS Visual Studio 2012 and install all updates up to SP4. Install CMake and make sure that it is in your system path variable. Delete any previously created "CMakeCache.txt" file in the build directory. Start the "Make VS2012 Project Files.cmd" and select your compiler version (professional or express) and select which components of BCI2000 you would like to build. After a new "CMakeCache.txt" has been created, refine your selections by starting the "Configure.sh.cmd" file which opens up the CMake GUI. There check the "BUILD_DEMOS" options and press "Configure" and then "Generate". Open the newly written "BCI2000.sln" file and compile the project. You should now have a AppConnectorExample.exe in the "\src\contrib\AppConnectorApplications\AppConnectorExample" folder.

Please note that you might run into issues if you have other versions of the MS Visual Studio compiler installed. In this case, uninstall these versions.

Regards, Peter

summersun
Posts: 14
Joined: 04 May 2015, 21:56

Re: the question about connecting the bci2000 to the ardunio

Post by summersun » 16 Sep 2015, 04:27

hi pbrunner

thanks for your reply , and i also want to use the parallelportfilter to conncet the bci2000 to the arduino, and the http://bci2000.org/wiki/index.php/Contr ... ter#States wrote the source code revision (known to compile under:4936), but after the SVN update ,the revision is 5007, and i have checked http://www.bci2000.org/wiki/index.php/P ... requisites and did not find the revision of 4936 . is there the website link that i can download the revision of 4936 ? is there the request for the edition of the visual studio ?

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: the question about connecting the bci2000 to the ardunio

Post by pbrunner » 16 Sep 2015, 09:34

Summersun,

the SVN revisions are incremental and the current SVN revision 5007 should work just fine. In fact, we are using this revision as the current beta.

When compiling this version, please make sure that you download a new SVN stack, as we have changed the build system and previous build binaries might interfere.

Concerning the ParallelPortFilter please be aware that it does not work on virtual parallel ports that are attached via USB. Hence you will need either a paralle port on the motherboard or PCI and PCI express based parallel port card.

Regards, Peter

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests