Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start_stream called function arguments - not enough #14

Open
Agomez-jaime opened this issue Dec 2, 2021 · 0 comments
Open

start_stream called function arguments - not enough #14

Agomez-jaime opened this issue Dec 2, 2021 · 0 comments

Comments

@Agomez-jaime
Copy link

Hi! I'm streaming data with the pyOpenBCI start stream function and in the argument calling another function, just as in your example:

from pyOpenBCI import OpenBCICyton

def print_raw(sample):
print(sample.channels_data)

board = OpenBCICyton(port='COM5', daisy=False)

board.start_stream(print_raw)

However, I need my function to have more arguments than just sample, but when I declare them in 'def print_raw(sample):', i need to also write them in 'board.start_stream(print_raw)'. Now, if I do that, I also have to write sample, so it would be something like this:
board.start_stream(print_raw(sample, argument2)

But when I do that, I get an error that says sample is not defined, and I don't know how I should define it for start_stream to accept more arguments. It feels like a vicious cycle.

Also, does anyone know the difference between start_stream and start_streaming? I've seen both on the Internet.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant