BioRadioDeviceStartAcquisition Method |
Namespace: GLNeuroTech.Devices.BioRadio
using System; using GLNeuroTech.Devices.BioRadio; namespace BioRadioAPIExamples { public class AcquisitionDemo { /// <summary> /// This sample method will connect to a device at the given mac ID and read data from the signal channels. /// </summary> public static void AcquireData(long macID) { BioRadioDeviceManager deviceManager = new BioRadioDeviceManager(); try { using (BioRadioDevice device = deviceManager.GetBluetoothDevice(macID)) { device.StartAcquisition(); while (!Console.KeyAvailable) { foreach (var signalGroup in device.SignalGroups) { foreach (BioRadioSignal signal in signalGroup) { var samples = signal.GetScaledValueArray(); foreach (var val in samples) { Console.Write(val.ToString("##.#### ")); } } } } device.StopAcquisition(); device.Disconnect(); } } catch (Exception e) { Console.WriteLine(e.Message); } finally { } } } }