Example Code

LabVIEW Emotiv Toolkit

Code and Documents

Attachment

Emotiv Brain Computer Interface

The emotiv headset is a wireless EEG system that measures brainwaves and allows programmers to use brain activity in their application. The basic API allows you to access Facial gestures, Emotivional states, Headset data like the gyro, and trained Cognitive actions.

If you don't want to buy a headset, Emotiv offers a simulation of the headset to start developing immediately. To set up with the simulated headset, you will need:

  • LabVIEW 8.6 or above
  • VI Package Manager by JKI

          http://jki.net/vipm/download

  • Emotiv Development Kit LITE executable from Emotiv

http://www.emotiv.com/store/sdk/edition/sdklite/

  • Emotiv Toolkit for LabVIEW (below)

Install the Emotiv Development Kit LITE software. Once installed, you can run the EmoComposer, which allows you to simulate the headset detecting emotions, facial gestures, or cognitive actions (no gyro or other headset properties). The EmoComposer and Control Panel communicate through network ports, so you may need to add an exception for the Emotiv software in your firewall:

http://www.sevenforums.com/tutorials/542-windows-firewall-add-remove-exception.html

You will need to locate the edk.dll and pass that to the toolkit (something like C:\Program Files\Emotiv Development Kit_v1.0.0.0-LITE\edk.dll).

To set up with the Developer SDK and a real headset, you will need:

Hardware:

  • Computer with USB port
  • Emotiv Headset

http://www.emotiv.com/store/hardware/epoc-bci/epoc-neuroheadset/

  • Saline solution (eye-contacts solution)

Software you will need:

  • LabVIEW 8.6 or above
  • LabVIEW 8.6 or above
  • VI Package Manager by JKI

          http://jki.net/vipm/download

  • Emotiv disk shipped with headset

http://www.emotiv.com/store/sdk/edition/sdklite/

  • Emotiv Toolkit for LabVIEW (below)

Install the Emotiv software on the disk.  Put the headset on (with plenty of saline solution). Open the Control Panel and verify that all of the sensors get a green icon. You can view your facial motions and emotions in the different tabs. Also try training a cognitive task so you can push or lift a block. The Control Panel communicates through network ports, so you may need to add an exception for the Emotiv software in your firewall:

http://www.sevenforums.com/tutorials/542-windows-firewall-add-remove-exception.html

- Regards,

Beutlich

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Sincrono
Member
Member
on

Hi, I tried to run use your toolkit unsuccesfully.

1)Is it possible with this toolkit to acces the raw signal of every channel?

If so... How?

2)When I try to run Basic Start Task.vi, Error Out code 1 appears (Source: Emotiv Error: An internal Error occured)

Hope to get help some way.

Beutlich
Member
Member
on

You need to have the Research Development Kit to get raw data from the Emotiv, and this Emotiv driver does not yet take advantage of the Research Edition (because I don't have access to it).

I recommend starting with the Emotiv front panel application, make sure everything on their software is working well. Then, you should be able to create a task and start a task, which will connect to the Emotiv front panel application.

- Regards,

Beutlich
Maynimation
Member
Member
on

Hi,

DO you have a video tutorial to connect the emotiv toolkit with Labview?

I just can´t get any signal, I am getting  the following error when trying to use the read file

Call Library Function Node in Emotiv Task.lvclass:Control Panel.vi->Cognitiv Actions-Control Panel.vi

Thanks

Mayra

Beutlich
Member
Member
on

Have you trained a user to have Cognitiv Tasks and loaded that user profile? Cognitiv Actions are a feature of the Emotiv Toolkit that require you to manage User settings.

- Regards,

Beutlich
corbin.wilhelmi
Member
Member
on

I understand that this is an older document; however, I am hoping that Beutlich still checks this and will be able to answer my question. 

I followed the above steps and downloaded the VI Package as well as Emotive Lite and ran the install on both of the .exe files.  I also downloaded the .vip file at the bottom of the document.  The .exe files installed correctely and I can open them.  The issue is that when opening the .vip file it says that "the file is not compatible with your operating system or any LabVIEW version installed on your computer". 

I have the 2012 Student Version (I am a graduate student) and am running labview through VMwareFusion (Windows 7) on my Mac.  I am assuming it is because of the Student Version; but, none of the other plugins I have installed have had a problem. 

Please Advise.

Best,

Corbin

EDIT: My apologies, I restarted my computer and it worked. 

Beutlich
Member
Member
on

Awesome! Drop me a line about what you are doing with it, I'd love to hear about the applications.

- Regards,

Beutlich
corbin.wilhelmi
Member
Member
on

Beutlich,

Please drop me an email to my lab email, have some questions about your interface that need emotiv sdks and I'm sure they would prefer that we communicate offline.  cwilhelmi@mrn.org.

Best,

Corbin 

alex142526
Member
Member
on

Hello

I'm Alex ,It seems like your already managed to connect to EPOC driver using Labview.

Can you tell me what did you do it?

I tried it, but all can't connect.

Please teach me what do i supposed to do?

Sincrono
Member
Member
on

I had more succes with matlab and bci2000 as im not a labview user. I use

labwindows.

El 10/11/2014 08:42, "alex142526" <web.community@ni.com> escribió:

Community

<https://decibel.ni.com/content/index.jspa> LabVIEW Emotiv Toolkit new

comment by alex142526 <https://decibel.ni.com/content/people/alex142526> View

all comments on this document

<https://decibel.ni.com/content/docs/DOC-18059#comment-38864>

rCassani
Member
Member
on

Hey,

Fo those looking for raw EEG data from the Emotiv, I just upload a package based on this LabVIEW Emotiv Toolkit. Check how to get raw EEG data here:

https://decibel.ni.com/content/docs/DOC-40699

Raymundo Cassani
rCassani
Member
Member
on

Check this out Alex to get raw EEG data from the Emotiv

https://decibel.ni.com/content/docs/DOC-40699

Raymundo Cassani
EmilianoCs
Member
Member
on

Hi! I am trying to use the ToolKit and i am using the edk.dll of the Emotiv Control Panel not the SDK Lite. So the Toolkit only works with the SDK Lite, but, the SDK Lite only works with EmoComposer. In that case there is no way to connect the Emotiv Headset if i don't have the SDK Premium?

Contributors