BrainFlow cannot access port in OpenBCI Cyton Daisy
Hi,
Could anyone give me a hand ? I have this issue in UNITY.
I am using BrainFlow.
Thanks for your help!
public class Sphere : MonoBehaviour
{
private BoardShim board_shim = null;
private MLModel concentration = null;
private int sampling_rate = 0;
private int[] eeg_channels = null;
private double[,] unprocessed_data = null;
private int board_id;
// Start is called before the first frame update
void Start()
{
BoardShim.enable_dev_board_logger();
BrainFlowInputParams input_params = new BrainFlowInputParams();
board_id = (int)BoardIds.CYTON_DAISY_BOARD;
input_params.serial_port = "COM3";
board_shim = new BoardShim(board_id, input_params);
board_shim.prepare_session();
// board_shim.start_stream (); // use this for default options
board_shim.start_stream(450000, "file://file_stream.csv:w");
System.Threading.Thread.Sleep(5000);
}
// Update is called once per frame
void Update()
{
BrainFlowInputParams input_params = new BrainFlowInputParams();
input_params.serial_port = "COM3";
unprocessed_data = board_shim.get_current_board_data(20);
eeg_channels = BoardShim.get_eeg_channels(board_id);
foreach (var index in eeg_channels)
Debug.Log(string.Join(", ", unprocessed_data.GetRow(index)));
}
}
Comments
The best place to ask Brainflow questions, is on their Slack, see,
https://brainflow.org/