#How to Setup Emokit Properly on Mac Emokit : https://github.com/openyou/emokit
###Prerequisites Homebrew and python installed
###Dependencies
- hidapi - https://github.com/signal11/hidapi
- pyhidapi - https://github.com/NF6X/pyhidapi
- pygame - http://pygame.org/wiki/MacCompile
###Installation ####Install hidapi
- Download / clone hidapi repo
$ git clone https://github.com/signal11/hidapi
- Go to hidapi directory and install as shared library
$ ./bootstrap
$ ./configure
$ make
$ sudo make install
####Install pyhidapi
- Download / clone pyhidapi repo
$ git clone https://github.com/NF6X/pyhidapi
- Go to pyhidapi directory and install
$ ./setup.py install --user
####Install pygame
$ brew install mercurial
$ brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi
$ pip install hg+http://bitbucket.org/pygame/pygame
####Install Emokit
- Download / clone emokit repo
$ git clone https://github.com/openyou/emokit
- Go to
python/
directory - Install emokit
$ python setup.py install
###Code Example
import emokit.emotiv as h
if __name__ == "__main__":
with h.Emotiv() as headset:
while True:
packet = headset.dequeue()
if packet is not None:
f7 = packet.sensors['F7']['value']
if f7 is not None:
outputF7.write('%s \n'%f7)
print("F7 :{f7_value} - {f7_quality}".format(
f7_value=packet.sensors['F7']['value'],
f7_quality=packet.sensors['F7']['quality'])
)