public static async Task Collect() { var client = new MuseClient(); Console.WriteLine("Connecting..."); var ok = await client.Connect(MyMuse.Address); if (ok) { await client.Subscribe( Channel.EEG_AF7, Channel.EEG_AF8, Channel.EEG_TP10, Channel.EEG_TP9, Channel.EEG_AUX); client.NotifyEeg += Client_NotifyEeg; Console.WriteLine("Starting..."); await client.Resume(); await Task.Run(Key); await client.Pause(); } }
public static async Task Collect() { var client = new MuseClient(); var ok = await client.Connect(MyMuse.Address); if (ok) { await client.Subscribe( Channel.EEG_AF7, Channel.EEG_AF8, Channel.EEG_TP10, Channel.EEG_TP9, Channel.EEG_AUX); client.NotifyEeg += Client_NotifyEeg; await client.Resume(); await Task.Run(Key); await client.Pause(); await SavePicture("e:/temp/temp.bmp"); } }
public async Task StartFeed(Action <string> report) { report("Connecting..."); var ok = await client.Connect(); if (ok) { await client.Subscribe( Channel.EEG_AF7, Channel.EEG_AF8, Channel.EEG_TP10, Channel.EEG_TP9, Channel.EEG_AUX ); client.NotifyEeg += Client_NotifyEeg; report("Starting..."); await client.Resume(); report("Running."); btnStart.Text = "Start"; } }