I'm using neurosky mindwave kit, so I downloaded Neuropy library to obtain the kit's readings, I tried a sample code:
from NeuroPy.NeuroPy import NeuroPy
from time import sleep
neuropy = NeuroPy()
def attention_callback(attention_value):
"""this function will be called everytime NeuroPy has a new value for attention"""
print ("Value of attention is: ", attention_value)
return None
neuropy.setCallBack("attention", attention_callback)
neuropy.start()
try:
while True:
sleep(0.2)
finally:
neuropy.stop()
and I get this error:
TypeError: __init__() missing 1 required positional argument: 'port'
does anyone know how to fix this, please?
Check the documentation
It clearly says You can pass the Port as an argument in the constructor
Initialising: