Emokit: Interpreting the raw data

827 views
Skip to first unread message

G

unread,
Mar 31, 2012, 11:41:18 AM3/31/12
to openyou
Hello,

I am a newbie at hardware interfacing, eeg, python etc. and want to
use emokit on ubuntu.
I couldn't install the python modules but was successful in getting
the c code compiled and running.
When i run 'emokitd' while the headset is turned on and it streams raw
data on the terminal or any file i pipe it to.

The data has 5 column,all numbers,and streams at an approximate rate
of 140 rows per second.
Since i am unable to run the python renderer that uses pygame, what do
i do with this data?
If someone could tell me the meanings of the rows and columns etc.
maybe I can plot it on my own using gnuplot which i am a bit familiar
with.

Thanks in advance,
G

G

unread,
Mar 31, 2012, 11:41:19 AM3/31/12
to openyou

Eric Berman

unread,
Mar 31, 2012, 3:18:02 PM3/31/12
to ope...@googlegroups.com
Ok, so each of those columns is data from a specific sensor.

The following code from "emokitd.c" prints a row of data from five of the sensors every time the headset takes a sample of data (roughly every 8 milliseconds). 


printf("%d %d %d %d %d\n", d->current_frame.gyroX, d->current_frame.gyroY, d->current_frame.F3, d->current_frame.FC6, d->current_frame.P7);

so the columns are then gyroX, gyroY, F3, FC6 and P7, and the remaining sensors are:


T8, F7, F8, T7, P8, AF4, F4, AF3, O2, O1, FC5

if you want to print them out you'll have to add them to that printf statement. As for graphing, you can either write that data to a file and graph it later, or you'll have to try to figure out how to send the data streaming to another program. Personally I recommend trying to send it to a UDP port, but you'll have to figure it out in C, as I used python for that.
--
Per aspera ad astra - "Through hardships to the stars."
Ex astris, scientia - "From the stars, knowledge."

G

unread,
Mar 31, 2012, 3:19:38 PM3/31/12
to ope...@googlegroups.com
I thought I'd post the error message I get when I try to run the python code "read.py", in case it's a standard issue and there is hope.
======
[15:15]xxxx~/Desktop/qdot-emokit-5ee6d54/python$ sudo python rawread.py 
Fine, connected to the Emotiv EPOC receiver
Starting MAIN
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/xxxx/Desktop/qdot-emokit-5ee6d54/python/emotiv.py", line 108, in reader
    self.gotData(data)
  File "/home/xxxx/Desktop/qdot-emokit-5ee6d54/python/emotiv.py", line 154, in gotData
    data = self.rijn.decrypt(data[:16]) + self.rijn.decrypt(data[16:])
AttributeError: 'Emotiv' object has no attribute 'rijn'
=======

Thank you,
G
Reply all
Reply to author
Forward
0 new messages