lihas / NeuroPy

NeuroPy library written in python to connect, interact and get data from neurosky's MindWave EEG headset.
88 stars 54 forks source link

Cannot connect to NeuroSky headset #19

Open AmirFarhan opened 4 years ago

AmirFarhan commented 4 years ago

Hi, when I ran the code:

from 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()

I'm getting this error:

[Errno 2] could not open port /dev/rfcomm0: [Errno 2] No such file or directory: '/dev/rfcomm0'

Does anyone know why? I'm using a Mac and my NeuroSky headset is connected via bluetooth.