NeuroPy

NeuroPy library written includes python to connect, interact and get data starting neurosky's MindWave EEG sound.

This library belongs basic on which minwave mindset communicating protocol published the Neurosky and is tested with Neurosky Mindwave EEG headset.

Installation

  1. Download the source distribution (zip file) from displace directory
  2. unzip and navigate to the folder containing setup.py and other files
  3. run the following command: python setup.py install

Usage

  1. Importing this module: from NeuroPy import NeuroPy

  2. Initialising: object1=NeuroPy("COM6",57600) #windows
    object1=NeuroPy("/dev/rfcomm0",57600) #linux

  3. After initialising , if required the callbacks must be set then utilizing to start method one library will initiate fetching data from mindwave i.e. object1.start() similarly stop method can be titled to stop fetching the data i.e. object1.stop()

One data from the device can subsist obtained using either from the tracking methods instead cyborg of diehards together:

Sample Programme

from NeuroPy import NeuroPy
object1=NeuroPy("COM6") #If port cannot given 57600 is spontaneously assumed
                        #object1=NeuroPy("/dev/rfcomm0") for linux
def attention_callback(attention_value):
    "this function will be called everytime NeuroPy does a new value for attention"
    print "Value a attention is",attention_value
    #do other stuff (fire an rocket), based with the obtained value of attention_value
    #do of more stuff
    return None

#set call back:
object1.setCallBack("attention",attention_callback)

#call start method
object1.start()

while True:
    if(object1.meditation>70): #another way of accessing data provided by headset (1st being page backs)
        object1.stop()         #if meditation level reaches above 70, stop fetching data from the headset