Project for Advanced Authentic Research (AAR).
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Brainwaves
emokit
scripts
README.md

README.md

Measuring Brainwaves

GitHub version

This is my project for Advanced Authentic Research (AAR). Follow the progress of this project on my blog. This project uses emokit which is an open source driver used to access the Emotiv Device raw data.

Extracting the Raw Data

  1. Download the repository
$ git clone https://github.com/nikhiljay/brainwaves.git
  1. Plug in your Emotiv's USB dongle.

  2. Find the Serial Number of the Emotiv by downloading HIDAPI.

$ git clone https://github.com/signal11/hidapi.git
$ cd hidapi
  1. In the HIDAPI go to the directory that corresponds to your operating system and run:
$ make -f Makefile-manual
  1. A hidtest file should be created in the same directory. Open the hidtest to run it.

  2. The output should be a list of devices that are connected to the computer. Look at the Emotiv device information and copy the Serial Number.

  3. In the brianwaves project, go to the emokit directory.

$ cd emokit/python/emokit
  1. Open "emotiv.py" and paste the serial number on line 361 where it says:
serial_number=""
  1. Run the "emotiv.py" file.
$ python emotiv.py
  1. If there are any dependencies that need to be installed used the "pip" command.
$ sudo pip install [missing dependency goes here]
  1. Install all dependencies until the following error is produced:
Traceback (most recent call last):
  File "emotiv.py", line 674, in <module>
    a.setup()
  File "emotiv.py", line 432, in setup
    self.setup_darwin()
  File "emotiv.py", line 537, in setup_darwin
    hidraw = hid.device(0x21a1, 0x0001)
  File "hid.pyx", line 45, in hid.device.__cinit__ (hid.c:1280)
  1. Turn on the Emotiv and try again. A succesful output should be printed:

These electrodes in the picture above represent certain parts of the brain shown here:

Displaying Data on an iOS Device

After extracting the Emotiv data, I sent the data as a JSON file to a local server. Then, I created an iOS app and used Alamofire to get request the data from the server. I created the app so that it would display the raw data on the iOS device. Here is what it looks like so far: