Neurosky Demo

Neurosky Unity3D Demo Package

The neurosky Demo package is a package to be used in Unity3D. This demo allows you to fully integrate your neurosky with unity3D as long as you use the Reh@panel protocol to send its information. There is already a tool (Reh@panel) that sends the neurosky information using this protocol.

Developed by: Tatiana Vieira, Yuri Almeida

Neurosky Demo User Manual

Importing the package

  1. Create a new project
  2. Import the package NeuroskyDemo.unitypackage
    1. Assets -> Import package -> Custom Package

Requirements to use the package

  1. Make sure you have the Neurosky SDK installed – Download Link here
  2. Plug in your Neurosky to the PC
  3. Make sure that it is sending information by UDP to port 1202 (To change this port see below).
    1. You can use the Reh@panel to do this – Download Link here

Testing the scene

  1. Open the Scene
    1. Neurehab -> Demo Neurosky-> Scenes -> NeuroskyDemo
  2. Make sure you fulfill all the requirements
  3. Press Play
The data is accessed through the NeuroskyUnity.cs script. If you open this script, in the UpdateGuiValues function you will notice that the Neurosky prefab values are updated there.  
private void UpdateGuiValues()
{
BarDelta.fillAmount = GenericDeviceData.GetFloat(Neurosky.delta.ToString())
GenericDeviceData.GetFloat("max_" + Neurosky.delta);
...
}
To be able to access any data that the Neurosky is sending, you will need to know two things: the label of the information you want to access and the type of that information. Then, using the NeuroskyUnity.cs script, you can find all this information by accessing the GenericDeviceData Dictionaries as shown below:
GenericDeviceData.Get[INFORMATION_TYPE](“[INFORMATION_LABEL]”);
For example, to access the Neurosky meditation value which is labeled as ‘meditation ’ and is of the type float, you can:
GenericDeviceData.GetFloat(“meditation”)

Current Neurosky protocol values

 
Information Label [INFORMATION_LABEL] Information Type [INFORMATION_TYPE]
deltaValue (float)
thetaValue (float)
lowalphaValue (float)
highalphaValue (float)
lowbetaValue (float)
highbetaValue (float)
lowgammaValue (float)
highgammaValue (float)
attentionValue (float)
meditationValue (float)
signalValue (float)

Media