如何从nuerosky mindwave耳机(使用rf加密狗)获取数据到C#? [英] How to acquire data into C# from nuerosky mindwave headset (using rf dongle) ?

查看:97
本文介绍了如何从nuerosky mindwave耳机(使用rf加密狗)获取数据到C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.IO.Ports;
using System.Threading;
using ThinkGearNET;

namespace haf
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
             _thinkGearWrapper.Connect("COM3", 57600, true);

           // if (!_thinkGearWrapper.Connect("COM3",57600, true))
             //   MessageBox.Show("Could not connect to headset.");
        }

        string a;

        private ThinkGearWrapper _thinkGearWrapper = new ThinkGearWrapper();
   
        private void button1_Click(object sender, EventArgs e)
        {
            _thinkGearWrapper = new ThinkGearWrapper();

            // setup the event
            _thinkGearWrapper.ThinkGearChanged += _thinkGearWrapper_ThinkGearChanged;
        }

		public void _thinkGearWrapper_ThinkGearChanged(object sender, ThinkGearChangedEventArgs e)
		{
            
           BeginInvoke(new MethodInvoker(delegate 
				{
					Console.WriteLine( "Attention: + e.ThinkGearState.Attention");
				   
				}));

            //output the data of the nuerosky
            
            string s="";
                     
           s += e.ThinkGearState.Attention + " ";
            //extracting attention Value in a
            a = e.ThinkGearState.Attention + " ";
                                
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            _thinkGearWrapper.Disconnect();
        }
        private void button1_KeyPress(object sender, KeyPressEventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            _thinkGearWrapper.Disconnect();
        }
    }
}



这是我的代码,它不起作用,_thinkgear.connect命令出错了它说


This is my code, its not working, there is an error in _thinkgear.connect command it says

Unable to find an entry point named 'TG_GetDriverVersion' in DLL 'ThinkGear'.




Unable to find an entry point named 'TG_GetDriverVersion' in DLL 'ThinkGear'.



有人能阻止我吗?



< b>我尝试了什么:



我已经包含了ThinkGear.dll库,问题在于将设备与C#连接。


Can anyone halp me out??

What I have tried:

I have included ThinkGear.dll library, The issue is with connecting the device with C#.

推荐答案

错误很明显:它无法找到它的功能需要在您正在使用的DLL文件中。

要么您没有所需的完整DLL文件集,要么其中一些用于不同版本的软件。



我首先要与制造商交谈 - 他们会比我们有更好的想法,至少可以要求你列出你用来比较的文件和版本他们的期望 - 我们不能!
The error is pretty clear: it can't find a function it requires in one of the DLL files you are using.
Either you don't have the complete set of DLL files it needs, or some of them are for different version of the software.

I'd start by talking to the manufacturers - they will have a much better idea than us and can at least ask you to list out the files and versions you are using to compare against what they expect - we can't!


这篇关于如何从nuerosky mindwave耳机(使用rf加密狗)获取数据到C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆