How to resolve issues with EEG Stream’s on the Raspberry PI 4?

Last Updated on February 12, 2024 by pg@petergamma.org

Flavio Frohlich is currently a tenured associate professor in the Departments of Psychiatry and Cell Biology and Physiology a member of the UNC, the University of North Carolina at Chapel Hill:

https://www.frohlichlab.org/

Flavio Frohlich some time ago wanted to stream his Muse headband to a Raspberry Pi 4. Unfortunately this did not work. So he opened an issue on Alexandre Barachants GITHUB:

https://github.com/alexandrebarachant/muse-lsl/issues/140

Peter Gamma now has found solutions how this problem could be solved and wrote to Flavio Frohlich on the GITHUB of Alexandre Barachant. Here is a reprint of what he wrote:

«
Hi Flavio Frohlich,

I am interested in resolving the issue described here as well, altough I usually don’t code. As far as I have seen here, no one was yet able to resolve the issue discribed here. After studying devices like the Muse headband, I found the information that Lab Streaming Layer with Python code requires an x86 processor, butRasperry Pi’s have arm based processors. There is code available which connect LSL to Python. But the code requires an x86 processor, which for instance a LattePanda has, but not Raspberry Pi’s

On a Raspberri Pi, LSL to Python does not run. This is an issue which has been described in the Lab Streaming Layer documentation of the Swartz Center of Computational Neuroscience. Unfortunately, I cannot refind where this has been written. But there was an issue at the LabStreamingLayer GITHUB with Rasperrry Pi’s and LabStreamingLayer as well:

pylsl not working on RaspberryPi #36

https://github.com/labstreaminglayer/pylsl/issues/36

Software developers at the Swartz Center of Computational Neuroscience https://sccn.ucsd.edu/ where the LabStreamingLayer has been developed use Matlab which requires an x86 processor. And I suppose they developed LSL with Matlab. But Matlab does not run on Raspberry Pi’s either. LSL was developed at https://sccn.ucsd.edu/, but also EEGLAB and BCILAB, and all of these software applications are based on Matlab.

To resolve the issue described here, I suggest for instance to try to use a LattePanda Delta instead of a Raspberry Pi 4, and to test if this works.

If you want to say with the Rasperry Pi platform, I suggest to use instead of the Muse headband OpenBCI modules and BrainFlow:

https://medium.com/@basoph2002/using-brainflow-with-openbci-eeg-recorder-on-a-raspberry-pi-e578dca675ce

Or the PiEEG shield:

http://pieeg.com/

Which offers Python code which runs on the Raspberry Pi. PiEEG was first announced, but now it says that it is unavailable:

https://www.crowdsupply.com/hackerbci/pieeg#products

4 channels where available for a short time, but now it is gone. Please support me and write to the PiEEG developer Ildar Rakhmatulin, PhD. to bring it back. E-mail:

I.Rakhmatulin@hw.ac.uk

But there are many more EEG, ECG, EMG, etc. devices available for developers who are on a budget. You can find those on the site:

Peter Gamma is greeting Flavio Frohlich from Switzerland, Peter Gamma from the Meditation Research Institute Switzerland (MRIS)
«