Error when sending Pulse sensor data via LSL
Hi all,
I have connected the Pulse Sensor and it is working fine. I can see the analog signal and the BPM.
However, when I try to send the pulse data via LSL, I get the following error:
Unexpected error during push_chunk: The number of buffer elements to send is not a multiple of the stream's channel count.
From what I understand, probably the lsl code is expecting more channels?
Any ideas are welcome.
Thanks.
Comments
Thanos, hi.
Is it a requirement that you use LSL on the receiving side? Generally we recommend programmers to utilize the Brainflow library instead of LSL. There is also a Slack where Andrey (the developer) answers questions.
https://brainflow.org/
Regards, William
https://github.com/OpenBCI/OpenBCI_GUI/issues/943
Thank you for making an issue on Github. The Pulse Sensor Widget may need some work. GUI v4 -> GUI v5 added BrainFlow and changed how the GUI accesses all data from boards.
Hi WIlliam,
Thank you for your suggestion. Unfortunately, I need the LSL stream for a custom tool we are working with: https://github.com/LaSEEB/NeuXus
Thanks for the replies.
It will be great if the new version has this bug fixed.
You still have another option than using the GUI to create the LSL stream. You can code your own Cyton stream reader in Python, that streams out in LSL.
https://brainflow.readthedocs.io/en/stable/Examples.html
https://github.com/labstreaminglayer/liblsl-Python
https://github.com/chkothe/pylsl
There are some old, deprecated LSL streamers written in Python. These read directly from the Cyton serial port. Coding your own Brainflow version would be much more maintainable.
https://github.com/openbci-archive/pyOpenBCI
https://github.com/openbci-archive/OpenBCI_Python
Code segments are on the Pulse Sensor site that show how to convert from the photo sensor readings, to BPM.
https://pulsesensor.com/
Algorithm used by GUI is here:
https://github.com/OpenBCI/OpenBCI_GUI/blob/master/OpenBCI_GUI/W_PulseSensor.pde
Regards, William
thank you for your suggestions.