Hi,
I was really annoyed that the NIA didnt come mac software, seeing as it should be easy to implement due to the NIA device acting as a HID.
Seems I was wrong...
The NIA acts as a HID, but it doesnt follow the protocol the way Mac's expect, and so you cant just access the data easily. But I used libusb, access via pyUSB to get to the NIA directly, so now we have a reader for Mac. I have also written the code to analyze brain waves and filter out some of the electrical noise etc. I still have to write the code to detect eye movement, although that should be easy as it has a very characteristic pattern.
What I don't know how to do it write a keyboard emulator, so that detected brain waves and glances can be used to generate simulated key presses, so as to control games and other software. Im guessing you can use Scripting Bridge for this, but it may not be fast enough. I will look into it later.
Anyway, here is a screenshot of the alpha code, let me know if anyone wants the software. It doesnt do much for now, but you can practice alpha/beta wave stuff etc.
It shows brain-fingers at the top; the bottom left is a fourier transform updated every 100ms from the bottom up, so you can see all the brainwaves from 8 to 40 hertz simultaneously for the past few second (more useful than brain fingers in my opinion), and the bottom right shows the current waveform, filtered of frequencies over 45Hz. It should work on Linux as well, with a few python eggs.
Anyway, let me know what you think.
Dave
*EDIT 1st May* So you dont have to read the whole thread![]()
The Python SDK framework is more or less finished. This SDK lets you access brainfinger data, clean fourier data, and filtered waveform data. Yet to be implemented are glance and muscle data, but these can be found in the waveform data.
Download the latest version from:
http://code.google.com/p/pynia/downloads/list
to generate keystrokes in MacOSX, first inport the applescript interface, "from appscript import *", then use something like this in the main loop:
This would generate an "x" keypress when the alpha 1 brainfinger reached 80% of maximum.Code:fingers = nia.fingers() if fingers[0] > 0.8: app('System Events').keystroke('x')


Reply With Quote





Bookmarks