How to get the Emotiv headset or EmoComposer reading with C# (C Sharp)
In this tutorial you will learn how to make a simple consol application that will read the state of your smile, left eye direction, and blink status. The rest of the functionality is straight forward from there.
This tutorial assumes that:
- You are using Microsoft Visual Studio 2008
- You are using DotNetEmotivSDK.dll 22.214.171.124
- You are using edk.dll 126.96.36.199
In order to read the current state of the Emotiv system you need to:
- Connect to the EmoEnging Connect()… RemoteConnect() if you are using emoComposer
- Capture the EmoState when the EmoEngin throws up the EmoStateUpdated event.
- When the EmoStateUpdated event occurs you can read the EmoState. Note the EmoState is created by the EmoStateUpdatedEventArgs when the EmoStateUpdated event occurs.
Please see the code below for the main code in a VS2008 Consol project. Also click here for the entire project. Please note that you will need to re-link the DotNetEmotivSDK.dll.
The end result will be a consol window that will output your smile extent twice in the form of lower facial expression strength, your smile strength and that state of you looking in the left direction.