On Mac it's simply enough to run
pip install pyglet pyusb numpy web.py. On GNU/Linux I had to compile and install the libusb code. Also, see the Troubleshooting - Access Denied section.
There are two user interfaces for pyNIA: pyglet and HTML5.
The pyglet interface has a histogram of the 6 BrainFingers at top, a spectograph that I don't understand in the bottom left, and a general compiled waveform of the raw output from the device in the bottom right.
I never got pyglet working on Mac, but it works fine on GNU/Linux. Simply run
Click here for the annotated version. The HTML5 interface has the same histogram as the pyglet version at top, but the other two images are different. The bottom left has a distorted hexagon I have nicknamed the Brain Shape, where the distortion to each vertex is determined by a specific BrainFinger. The hexagon is bluer when all frequencies are low, redder when beta frequencies are high, and greener when alpha frequencies are high. The bottom right is a historical graph of all six BrainFinger values, instead of a single compiled waveform.
- You will need to install CoffeeScript, have
coffeeon your path, and run
batch/coffee-compile.sh. Alternatively, you can use Coffee2JS to convert
/src/coffee/index.coffeeand save the output to
- Once you have compiled the CoffeeScript code, run
python http.pyand visit
I ran into quite a few problems getting pynia working. David Ng's project had 2 fairly different versions of the code. I'm going to be developing primarily off the version 0.0.1 codebase because it required less modifications to make it functional, and it also has much better documentation.
"Access Denied" warning on GNU/Linux
By default, libusb doesn't provide read/write access to USB devices. In order to
get pynia working on Linux without root privileges, you need to add an
exception for the NIA to your udev rules in
/etc/udev/rules.d (a sample file
has been included in the
udev folder of this repo), and then you need to run
udevadm control --reload-rules to reload the rules. After that,
unplug the NIA and plug it back in.
The original documentation of the project follows:
This is a simple GUI to play with the NIA on Mac and Linux until OCZ release a set of drivers for these platforms.
It requires the following dependencies: