Brian is a Microsoft C# MVP who has been actively developing in .NET since its early betas in 2000, and who has been developing solutions using Microsoft technologies and platforms for even longer. Additionally, Brian has co-authored the book "Coding4Fun: 10 .NET Programming Projects for Wiimote, YouTube, World of Warcraft, and More" published O'Reilly. He previously co-authored the book "Debugging ASP.NET" published by New Riders. Brian is also an author for MSDN's Coding4Fun website. Brian is a DZone MVB and is not an employee of DZone and has posted 8 posts at DZone. You can read more from them at their website. View Full User Profile

ThinkGearNET Library

  • submit to reddit

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!


Published at DZone with permission of Brian Peek, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)