Can't get faster than 50hz using C++ API, Muse2016 EEG


#1

Hey,

I’m trying to read the EEG signal from my Muse2016 at 256hz, but so far I’ve only been able to receive packets at ~25hz. I’ve been using the boiler plate app in Windows 10 (GettingData).

The API says that there are two modes for connecting, run_asynchronously(), and execute(). With run_asynchronously, the data listener is receiving a packet every 40ms. I also tried the connect() and execute() method, however after running connect(), I receive no connection packet.

Any clues? Thanks!


#2

Hi,

One thing to check is that you are not doing any “expensive” operations like file saving on the same thread as the one receiving the data. This can impact the rate at which you receive the data.

Also note that the display rate in GettingData will only refresh at a maximum of 60Hz. I know if I modify the example to count the number of packets received in receive_muse_data_packet(), then I get ~256 packets in a second, but not every packet will be displayed in the UI.

Regarding the connect/execute methods, you need to set up a thread to repeatedly call execute. Execute performs a small amount of work each time it is called and must be continually called to transition through to the connected state and to continue to receive data.

Hope that helps.


#3

Thanks for the help!

I did as you said and times the receive_muse_data_packet() using std::chrono. I’m seeing that packets normally arrive in the correct time. There’s a bit of lag every time the UI updates, but I think that’s to be expected (20ms).

I put the project up here: https://researchonabudget.wordpress.com/2017/02/14/getting-data-out-of-the-muse2016-eeg-headband/