I tried to get some answers to my questions from the Emotiv support team and community but no one answered so I thought maybe some of you are using the Emotiv API.
I'm having a hard time figuring out how the raw data acquisition process works. I read all the topics I could find about EEG raw data acquisition with the Emotiv headset but they didn't help.
here are my questions:
- Is it somehow possible to acquire 1 Sample per Channel?
In my application there is a timer function that invokes exactly every 1ms. And I would like to invoke another function if the buffer contains 1 Sample per Channel.
- Does the function EE_DataUpdateHandle() dump all of my retrieved samples when invoked?
I polled the EE_DataGetNumberOfSample() function in order to invoke another function if the Buffer contains 1 Sample per Channel but the EE_DataGetNumberOfSample() function never returns 1 sample. Is this because EE_DataUpdateHandle() dumps all the other samples if it is invoked? I thought If the EE_DataUpdatedHandle() function is invoked it points to the new data right? --> Does that mean that all the data collected before is not accessible anymore? Isn't there a function that just returns EDK_OK when 1 Sample per Channel is ready to be retrieved. So I can poll every ms in my timer function and if it returns EDK_OK I call EE_DataGet and it returns 1 Sample per Channel.
- I read that you suggest to use Sl eep() in order to get the buffer filled before calling the EE_DataUpdateHandle() do you think it is possible to just count in my timer function 1/128seconds in order to retrieve 1 Sample per Channel? I'm really not sure how to do this... after about 7.8 ms there should be 1 Sample per Channel in the buffer right? What happens if I call the EE_DataGet function every 8ms as my timer function is just called every 1ms?
Ok, I hope that you can come up with some suggestions how to solve my problem!
Cheers, Dominik
I think it would be not possible to get just 1 sample from a channel at once unless emotiv change their programming model.
The current emotiv API library seems to acquire data from headset and save them to a data buffer, while the client application can only poll data from the buffer with EE_DataGet.
Probably the buffer would not be filled with only one data entry by emotiv library. If it is not so, you can try do polling as quick as possible (quicker than data acquisition) to see if you can get only 1 sample with EE_DataGet (and then call EE_DataUpdateHandle to clean up buffer for new sample).