Skip to content

Mind reading with Neurosky ThinkGear and Emotiv Epoc

Ravbug edited this page Jan 18, 2019 · 1 revision

Mind Reading with Neurosky ThinkGear

GlovePIE 0.42 now (theoretically) supports Neurosky’s ThinkGear EEG headsets. The headset must be connected via Bluetooth, and the Bluetooth data needs to be set to a virtual COM port. I think you can do that in your Bluetooth software. Make a note of which COM port your Neurosky is using.

The Neurosky headset also includes a microphone, which GlovePIE can use for voice commands (speech recognition). You should train speech recognition in Control Panel, and then use the said(“whatever”) function in GlovePIE.

In GlovePIE you need to specify the COM port after the “Neurosky.”.

eg. Debug = Neurosky.Com5.RawAttention

If you don’t specify a COM port, it will assume COM5.

Unlike the Emotiv Epoc, Neurosky don’t detect facial expressions or “cognitiv” thoughts. They can only detect 2 emotional states: Attention (like Engagement), and Meditation.

Neurosky.Com5.RawAttention   (aka RawEngagement)
Neurosky.Com5.RawMeditation

But Neurosky can detect the strength of various kinds of brain-waves:

Neurosky.Com5.RawAlpha1
Neurosky.Com5.RawAlpha2
Neurosky.Com5.RawBeta1
Neurosky.Com5.RawBeta2
Neurosky.Com5.RawGamma1
Neurosky.Com5.RawGamma2
Neurosky.Com5.RawDelta
Neurosky.Com5.RawTheta

And you can tell whether it exists, and the battery level:

Neurosky.Com5.Exists
Neurosky.Com5.RawBattery
Neurosky.Com5.RawPoorSignal (this needs to be 0 for it to work properly)

Exists is true or false. The others are decimals with unknown units and ranges. I’m guessing RawAttention and RawEngagement are between 1 and 100, with 0 meaning not working. But I can’t be sure, which is why everything is marked “Raw”.

Mind Reading with Emotiv Epoc

!NOT SUPPORTED IN GLOVEPIE 0.45 Free!

The Emotiv Epoc headset uses an EEG to read your thoughts, feelings, and facial expressions, and it uses gyros to read your head rotation.

Currently a maximum of two Emotiv Epocs can be used at once in GlovePIE (as Emotiv1 and Emotiv2).

NEW! GlovePIE 0.40 had a bug which stopped it from compiling scripts that use Emotiv Epoc, but it has now been fixed in GlovePIE 0.41.

This release of GlovePIE 0.41 only supports the $500 (US) SDK version of the Emotiv Epoc, not the $300 consumer version. Don’t blame me, Emotiv deliberately prevent developers from supporting their product unless they pay.

If you don’t have an Emotiv Epoc, you can download the free SDK Lite from Emotiv’s website and use the included EmoComposer and Emotiv Control Panel to simulate an Emotiv Epoc. Or you can download the Epoc Control Panel from the Emotiv website and use it’s EmoComposer.

Running

GlovePIE will first try to connect to Emotiv Control Panel. If Control Panel is not running then it will try to connect to EmoComposer. If EmoComposer is not running then it will try to connect directly to the headset.

If you don’t have an Epoc, then I recommend running EmoComposer, then running Emotiv Control Panel, then choosing Connect > To EmoComposer… in the Emotiv Control Panel’s menu, then running your GlovePIE script.

If you do have an Epoc, then I recommend running Emotiv Control Panel, then running your GlovePIE script. GlovePIE has not been tested with a real Epoc yet, but it should theoretically work.

But try changing which of those applications are running if you are having trouble getting it to work.

Reading thoughts

There are currently 13 different thoughts that can be detected. But the Emotiv Epoc can only listen for a maximum of 4 thoughts at a time. They must be set in Control Panel (I assume). I don’t know if you can get around that limitation by running Control Panel twice.

Currently GlovePIE doesn’t tell the Epoc which thoughts to listen for, or which profile to load, so you probably need to do that in Control Panel.

Each thought will have a value between 0 and 1. Only one thought can be non-zero at a time. If one thought is greater than zero, all the other thoughts will be zero.

emotiv.push: pushing forwards with your mind
emotiv.pull: pulling backwards with your mind
emotiv.lift: lifting upwards with your mind
emotiv.drop: dropping down with your mind
emotiv.left: pushing something to the left
emotiv.right: pushing something to the right

emotiv.RotateForwards: rotating an object like a wheel moving forwards, or pitching the far side of an object downwards.
emotiv.RotateReverse: rotating an object like a wheel moving packwards, or pitching the far side of an object upwards.
emotiv.RotateLeft: despite its name, this actually rotates an object clockwise (as viewed from above), so that the near side of an object moves left while the far side of an object moves right. You can also think of this as yawing the far side of an object right.
emotiv.RotateRight: despite its name, this actually rotates an object anticlockwise (as viewed from above), so that the near side of an object moves right while the far side of an object moves left. You can also think of this as yawing the far side of an object left.
emotiv.RotateClockwise: rolling or tilting an object sideways, so that the top moves to the right and the bottom moves to the left. You can think of this as rolling right.
emotiv.RotateCounterClockwise: rolling or tilting an object sideways, so that the top moves to the left and the bottom moves to the right. You can think of this as rolling left.

emotiv.disappear: visualising an object disappearing.

To use any of these values in your script, just write a line like this: Enter = emotiv.push

That will make it press Enter whenever you are thinking “push”. By default, the push thought needs to be stronger than 0.5 for it to work.

If you want more control, then you can specify how hard they have to push: Enter = emotiv.push > 20%

20% is an alternative way of writing 0.2. You can use either way: Enter = emotiv.push > 0.2

There are also axes and vectors:

CognitivX, CognitivY, CognitivZ, 
CognitivYaw, CognitivPitch, CognitivRoll,
CognitivXY, CognitivXZ, CognitivXYZ

Emotions

Multiple emotions can be true at the same time. These emotions have a value between 0 and 1:

Excitement
Meditation
Frustration
EngagementBoredom
ExcitementLongTerm
LongTermExcitement

Facial Expressions

Blink
WinkLeft
WinkRight
EyesOpen
LeftEye
RightEye
EyeX
EyeY (probably always 0)
EyeXY (y is probably always 0)
LookingUp, LookingDown (probably always 0)
LookingLeft
LookingRight
Eyebrow
Furrow
Smile
Clench
Laugh
SmirkLeft
SmirkRight
SmirkX

Other

Exists
Count – total number of headsets connected, may be less than number of the maximum headset if the first headset is not connected.
HeadsetOn
WirelessSignalStrength – 0, 0.5, or 1. Must be 1 for it to work properly.
LedPlayer – Sets the player number shown on the leds for that headset
Battery
RawGyroDeltaX – Horizontal Gyro movement since last frame?
RawGyroDeltaY – Vertical Gyro movement since last frame?
RawGyroDeltaXY – Gyro movement since last frame? As a vector
RawGyroTotalX – Total Horizontal Gyro movement since the start
RawGyroTotalY – Total Vertical Gyro movement since the start
RawGyroTotalXY – Total Gyro movement since the start as a vector
CognitivActive – Cognitiv is working before enough electrodes are connected properly
ExpressivHasTrainedSig – A trained signature is available for Expressiv
ExpressivUsingTrainedSig – Use the trained signature for Expressiv (instead of the universal one) You can set ExpressivUsingTrainedSig.

Clone this wiki locally