User.py does not work

Signal_XSignal_X Brazil
edited August 2018 in Software
Dear,

I tried to run the command below (Windows 10, board cyton):

python user.py -p COM3

And I get the following message:

WARNING: no plugin selected, you will only be able to communicate with the board. You should select at least one plugin with '--add [plugin_name]'. Use '--list' to show available plugins or '--info [plugin_name]' to get more information.
Board type: OpenBCI Cyton (v3 API)
Port:  COM3

------------SETTINGS-------------
Notch filtering:True
user.py: Logging Disabled.

-------INSTANTIATING BOARD-------
Traceback (most recent call last):
  File "user.py", line 114, in <module>
    board = bci.OpenBCIGanglion(port=args.port,
AttributeError: module 'openbci.cyton' has no attribute 'OpenBCIGanglion'

Has anyone had the same problem? I followed the instructions but without success.

After that, I tried to run the script test.py from the Scripts folder. I was able to successfully sample them, however, I would like to know how I can stop data streaming because the code runs indefinitely. Follow the code below:

import sys; sys.path.append('..') # help python find cyton.py relative to scripts folder
from openbci import cyton as bci
import logging
import time

def printData(sample):
    #os.system('clear')
    print("----------------")
    print("%f" %(sample.id))
    print(sample.channel_data)
    print(sample.aux_data)
    print("----------------")

if __name__ == '__main__':
    # port = '/dev/tty.OpenBCI-DN008VTF'
    #port = '/dev/tty.usbserial-DB00JAM0'
    port = 'COM3'
    # port = '/dev/tty.OpenBCI-DN0096XA'
    baud = 115200
    logging.basicConfig(filename="test.log",format='%(asctime)s - %(levelname)s : %(message)s',level=logging.DEBUG)
    logging.info('---------LOG START-------------')
    board = bci.OpenBCICyton(port=port, scaled_output=False, log=True)
    print("Board Instantiated")
    #board.ser.write('v')
    board.ser.write('v'.encode())
    time.sleep(10)
    board.start_streaming(printData)
    board.print_bytes_in()

Thank you in advance for helping me.

Comments

Sign In or Register to comment.