You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a Cyton board and a .net core program that is using Brainflow. I've noticed that, when I use "get_board_data", and I look at channel 22 (the timestamp data), there are intermittent gaps of about .5 seconds between two readings.
Specifically, I'm looking at this part of the code:
int count = 0;
board_shim.start_stream();
while (true)
{
System.Threading.Thread.Sleep(5000);
Globals.UNPROCESSED_DATA = board_shim.get_board_data();
count++;
Console.WriteLine();
Console.WriteLine($"Data Received, loop number {count}");
Console.WriteLine($"Start Time:{Globals.UNPROCESSED_DATA[_timestamp, 0]}");
Console.WriteLine($"End Time:{Globals.UNPROCESSED_DATA[_timestamp, Globals.UNPROCESSED_DATA.GetLength(1) - 1]}");
await _taskQueue.QueueBackgroundWorkItemAsync(BuildWorkItemAsync);
}
The goal of the above code is to poll the Cyton board for 5 seconds, get the data using "get_board_data", and then queue up the result in a background Queue process. Then, the while loop starts over and should pick up at or near the last timestamp in the previous interval.
However, when I look at the polled data, there are .5 second gaps within the readings themselves, as shown below:
Info (please complete the following information):
OpenBCI Cyton Board
Windows 11
C# .NET Core
x64
Expected behavior
The timestamps on data should follow a consistent pattern without time gaps
Please let me know if I can provide any additional information. Thank you!
The text was updated successfully, but these errors were encountered:
Thanks for the reply. I initially thought that my looping logic might have had something to do with it too, so I simplified the code to just take a single 5 second sampling of data, and still found that there were .5 second gaps, all within the same polling period.
I then look at the 2d array that is returned in UNPROCESSED_DATA, and found the same gaps within the data
I still need to look into the latency setting that you mentioned, although I'm not using the OpenBCI GUI, so I'm trying to find how to set the latency directly within my program
Describe the bug
I have a Cyton board and a .net core program that is using Brainflow. I've noticed that, when I use "get_board_data", and I look at channel 22 (the timestamp data), there are intermittent gaps of about .5 seconds between two readings.
To Reproduce
This is my main logic on my .net core program:
https://github.com/o-biotech/openbiotech-iot-stream-brainflow/blob/master/openbiotech-iot-stream-brainflow/QueueHostedService.cs
Specifically, I'm looking at this part of the code:
The goal of the above code is to poll the Cyton board for 5 seconds, get the data using "get_board_data", and then queue up the result in a background Queue process. Then, the while loop starts over and should pick up at or near the last timestamp in the previous interval.
However, when I look at the polled data, there are .5 second gaps within the readings themselves, as shown below:
Info (please complete the following information):
Expected behavior
The timestamps on data should follow a consistent pattern without time gaps
Please let me know if I can provide any additional information. Thank you!
The text was updated successfully, but these errors were encountered: