Posted March 8, 2010 11:06 AM
Categories: .NET | Coding4Fun | Gaming | Hardware | Neurosky MindSet
I have written and posted a new library that allows .NET developers to easily connect to and use the Neurosky MindSet headset from any .NET application. You can find the source code and a binary of the library at CodePlex. Usage is very simple and may seem familiar to those that have used my .NET Wiimote LIbrary; set a reference to the library and you can connect to a headset as follows:
private ThinkGearWrapper _thinkGearWrapper = new ThinkGearWrapper();
private void Connect()
_thinkGearWrapper = new ThinkGearWrapper();
// setup the event
_thinkGearWrapper.ThinkGearChanged += _thinkGearWrapper_ThinkGearChanged;
// connect to the device on the specified COM port at 57600 baud
_thinkGearWrapper.Connect("COM4", 57600, true);
void _thinkGearWrapper_ThinkGearChanged(object sender, ThinkGearChangedEventArgs e)
// write out one of the many properties
Debug.WriteLine("Attention: " + e.ThinkGearState.Attention;
The download includes a test application with source code that shows how to use the library in any .NET application. You can see a more advanced usage example by taking a look at my MindBlaster article or reading through its source code.
Questions welcome. Enjoy!