Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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");
            }
        }
Ejemplo n.º 3
0
        private async void btnStop_Click(object sender, EventArgs e)
        {
            await client.Pause();

            Report("Paused.");
        }