Unable to stop streaming using OpenBCI-python

JayroMartinezJayroMartinez Tübingen, Germany

Hi everyone!!
I wrote a code to acquire data using python and the OpenBCI-python API. To acquire it I'm using the functions that are showed in the sample scripts like stream_data_wifi.py as it follows:
connection.start_streaming(handle_streamed_data)
connection.loop()
connection.stop()
connection.disconnect()

My poblem is that I'm not able to stop the streaming (is never reaching the connection.stop even if I use some flag variable). Only if I include this code inside the handle_streamed_data() function stops streaming but the problem in this case is that is doing another iteration and I have an error because is not able to find the connection.

Does anyone knows how to deal with this? What I'm doing wrong?

Thanks in advance

Comments

Sign In or Register to comment.