ThinkGearNET Library
Join the DZone community and get the full member experience.
Join For FreeI 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.
Links
Questions welcome. Enjoy!
Published at DZone with permission of Brian Peek, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Part 3 of My OCP Journey: Practical Tips and Examples
-
Tech Hiring: Trends, Predictions, and Strategies for Success
-
Mastering Time Series Analysis: Techniques, Models, and Strategies
-
Never Use Credentials in a CI/CD Pipeline Again
Comments