OpenBCI / OpenBCI_Cyton_Library

Repository for OpenBCI Cyton Arduino Libraries
MIT License
87 stars 88 forks source link

EEG hiccups when '`' is sent via serial #68

Closed gerrievanzyl closed 6 years ago

gerrievanzyl commented 7 years ago

I have tried the following on 2.0.1 and 3.0.0 dev firmware.

In my attempts to insert markers into the stream I have used the functionality in 2.0.1 to send the '`' character. When I type this on the keyboard it creates a "hiccup" on the EEG data stream in the GUI plots. See the attached screenshot around t=-4s. I have not checked whether these artifacts are present in the SD files. This instability would certainly limit the ability gather data where stimulations are handled by the Cyton board.

I tried this on a modified 3.0.0 dev firmware (modified to expect `n and insert a marker with value n into auxData[0] ) and it creates the same artifact.

What I did notice was that whenever I sent serial commands to the board, it did miss at least one packet. Is this just a problem with the GUI filters?

It is not clear to me why sending 2 chars to the board (with trivial processing on the board side) would mess up timing enough to miss one packet. Is this this possibly a bug?

untitled

andrewjaykeller commented 7 years ago

hi can you please paste your firmware code? the hiccup you see in the GUI is because the board temporarily stops the stream for some commands, such as setting the channels. Is the ``` taken? Maybe there is another function that is using that already, I can't remember.

gerrievanzyl commented 7 years ago

AJ,

Firmware code has been pushed. I am 99.9% sure it is not the FW as the hiccup is not visible in the SD card data.

I have done more testing and found that the hiccup happens 9 out of 10 times.

Here is some further info:

On Sat, Aug 26, 2017 at 1:57 PM, AJ Keller notifications@github.com wrote:

hi can you please paste your firmware code? the hiccup you see in the GUI is because the board temporarily stops the stream for some commands, such as setting the channels. Is the ``` taken? Maybe there is another function that is using that already, I can't remember.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenBCI/OpenBCI_32bit_Library/issues/68#issuecomment-325152355, or mute the thread https://github.com/notifications/unsubscribe-auth/AOSh__KV5DHV8lSkIrBxT2UTiKEY9Un5ks5scFyTgaJpZM4O49qZ .

gerrievanzyl commented 6 years ago

I believe this only applicable to BLE connections - it may be because we are pushing the BLE connection hard and any interference with the stream of data results in lost packets. I am closing this for now. If I find it is a problem on wifi I will reopen