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 async Task <Telemetry> TelemetryAsync()
        {
            var client = new MuseClient();

            Console.Write("\rConnecting...");
            await client.Connect();

            await client.Start();

            await client.Resume();

            Console.WriteLine("\rWaiting for signal...");
            var telemetry = await client.ReadTelemetryAsync();

            await client.Disconnect();

            return(telemetry);
        }
Ejemplo n.º 3
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.º 4
0
        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";
            }
        }