You are on page 1of 9

MDTforWindowsInstruction

February19,2016

TheNeuroSkyproductfamiliesconsistofhardwareand
softwarecomponentsforsimpleintegrationofthisbiosensor
technologyintoconsumerandindustrialendapplications.
Allproductsaredesignedandmanufacturedtomeetconsumer
thresholdsforquality,pricing,andfeaturesets.NeuroSky
setsitselfapartbyprovidingbuildingblockcomponent
solutionsthatofferfriendlysynergieswithrelatedandcomplementary
technologicalsolutions.

NOWARRANTIES:THENEUROSKYPRODUCTFAMILIES
ANDRELATEDDOCUMENTATIONISPROVIDED"AS
IS"WITHOUTANYEXPRESSORIMPLIEDWARRANTY
OFANYKINDINCLUDINGWARRANTIESOFMERCHANTABILITY,
NONINFRINGEMENTOFINTELLECTUALPROPERTY,
INCLUDINGPATENTS,COPYRIGHTSOROTHERWISE,
ORFITNESSFORANYPARTICULARPURPOSE.INNO
EVENTSHALLNEUROSKYORITSSUPPLIERSBELIABLE
FORANYDAMAGESWHATSOEVER(INCLUDING,WITHOUT
LIMITATION,DAMAGESFORLOSSOFPROFITS,BUSINESS
INTERRUPTION,COSTOFREPLACEMENTGOODSOR
LOSSOFORDAMAGETOINFORMATION)ARISINGOUT
OFTHEUSEOFORINABILITYTOUSETHENEUROSKY
PRODUCTSORDOCUMENTATIONPROVIDED,EVEN
IFNEUROSKYHASBEENADVISEDOFTHEPOSSIBILITY
OFSUCHDAMAGES.,SOMEOFTHEABOVELIMITATIONS
MAYNOTAPPLYTOYOUBECAUSESOMEJURISDICTIONS
PROHIBITTHEEXCLUSIONORLIMITATION
OFLIABILITYFORCONSEQUENTIALORINCIDENTAL
DAMAGES.

USAGEOFTHENEUROSKYPRODUCTSISSUBJECT
TOANENDUSERLICENSEAGREEMENT.

MadeforiPod,MadeforiPhone,andMadefor
iPadmeanthatanelectronicaccessoryhasbeendesigned
toconnectspecificallytoiPod,iPhone,oriPad,respectively,
andhasbeencertifiedbythedevelopertomeetApple
performancestandards.Appleisnotresponsiblefor
theoperationofthisdeviceoritscompliancewithsafety
andregulatorystandards.Pleasenotethattheuseof
thisaccessorywithiPod,iPhone,oriPadmayaffect
wirelessperformance.

Contents

IntroductiontoMDT
IntroductiontoMDTforWindows
Usage
ReferencesandBugreports

IntroductiontoMDT

NeuroSky's
MindDeveloperTools
(hereafterabbreviated
MDT
or
DeveloperTools
)
areasetofsoftwaretoolsthatmakeiteasytocreateinnovativeapplicationsthat
respondtoauser'sbrainwavesandmentalstate.

IfyoualreadyhaveaNeuroSkyheadset(suchas
MindWaveMobile
),youarealready
abletotakefulladvantageofitwithourDeveloperTools.Ifyouaretryingoutthe
DeveloperToolsbeforepurchasingaheadset,thankyouforreviewingthetoolset.
However,pleasenotethataNeuroSkyheadsetwillbeneededwhenyouaredeveloping
yourownappusingtheDeveloperTools.TheheadsetisavailableonAmazonstore:
http://www.amazon.com/NeuroSkyMindWaveMobileBrainWaveStarter/dp/B00B8BF4EM
.

Ifyouhaveanyquestions,letusknowat
support@neurosky.com
.

IntroductiontoMDTforWindows

Forthepurposesofthisdocument,wewilllooselyusetheterms
PC
and
Windows

interchangeablythroughout.The
MDTforWindows
allowsyoutodevelopsoftware
applicationsthatwillrunonaWindowssystem.

The
MDTforWindows
includes:T
hinkGear_Connector,ApplicationStandards,
StreamSDKforPC,

EEGAlgorithmSDKforWindows
and
EULA.

ThinkGear_Connector
TheThinkGearConnector(TGC)isasoftwareprogram
analogoustoasocketserverthatrunsasabackgroundprocessonyour
computerandisresponsiblefordirectingdatafromaNeuroSky
ThinkGearenabledheadsetfromtheserialporttoanopennetworksocket.Itis
availableonbothWindowsandOSX.Anylanguageorframeworkthatcontainsa
socketlibraryshouldbeabletocommunicatewiththesocketAPI.TGCisan
idealoptionfordevelopersworkinginframeworkslikeAdobeFlashorwebbased
applications.

ApplicationStandards
DocumentandIconImages

EULA
EndUserLicenseAgreement

StreamSDKforPC
isusedtohelpconnectyourapplicationtoaNeuroSky
headsetviabluetooth,andreceivedatafromheadset.Itcontainsthefollowsfile:
*StreamSDKforPCDevelopmentGuide
libs
x86/win32
*thinkgear.dll
*thinkgear.lib
*thinkgear.h
csharp
*thinkgear.dll
*NativeThinkgear.cs
x64/win64
*thinkgear64.dll
*thinkgear64.lib
*thinkgear.h
csharp
*thinkgear64.dll
*NativeThinkgear64.cs

SampleProject
x86/win32
*thinkgear_testapp
*thinkgear_testapp_csharp
x64/win64
*thinkgear_testapp
*thinkgear_testapp_csharp_64
*ChangeLog.txt

EEGAlgorithmSDK
isusedtoanalyzeandfurtherinterpretEEGdatafrom
NeuroSkysheadsetorTGAMmodule.ItincludesAttention,MeditationandEye
BlinkDetection.Thesethreealgorithmsarefreetousewithinyourapplication.It
containsthefollowsfile:
*Readme

*EEGAlgorithmSDKforWindows:DevelopmentGuide
EEGAlgorithmSDKDynamicLinkedLibrary(DLL):
*AlgoSdkDll.dll(for32bit)
*AlgoSdkDll64.dll(for64bit)
AlgoSDKSampleproject

IfyouwantmoreinformationaboutotherEEGalgorithms,pleasecontactusat
support@neurosky.com
.

Fordetails,pleasecheckwithineachpackage.

Usage

EachSDKincludesasampleprojectanddocumentswhichteachyouhowtousethem.

InordertomaketheintegrationprogressforSDKsmoresmooth,pleasereviewthe
documentsofSDKs.Forexample,review
StreamSDKforPCDevelopment
Guide.pdf
tostartwiththeStreamSDK.ForEEGAlgorithmSDK,pleasereview

eeg_algorithm_sdk_for_windows_development_guide.pdf
.

ThinkGear_Connector
isanindependentpackagebasedonNeuroSky
ThinkGearenabledheadset,pleasereviewallthedocumentsofTGCtostart.

ApplicationStandards.pdf
isveryuserful.Ittellsyouhowtousetheiconstomarkthe
statusofconnectioninyourproject.

HereisacodesnippetwhichshowshowtousetheseSDKtogether(Thiscodesnippet
isfromthe
EEGAlgorithmSDK
ssampleproject):

staticDWORDThreadReadPacket(LPVOIDlpdwThreadParam){
intrawCount=0
wchar_tbuffer[100]
shortrawData[512]={0}
intlastRawCount=0

while(true){
/*ReadasinglePacketfromtheconnection*/
packetsRead=TG_ReadPackets(connectionId,1)

//swprintf(buffer,20,L"%d",packetsRead)
//OutputLog(buffer)

/*IfTG_ReadPackets()wasabletoreadaPacketofdata...*/

if(packetsRead==1){
/*IfthePacketcontaintedanewrawwavevalue...*/
if(TG_GetValueStatus(connectionId,TG_DATA_RAW)!=0){
/*Getandprintoutthenewrawvalue*/
rawData[rawCount++]=(short)TG_GetValue(connectionId,TG_DATA_RAW)
lastRawCount=rawCount
if(rawCount==512){
(NSK_ALGO_DataStreamAddr)(NSK_ALGO_DATA_TYPE_EEG,rawData,rawCount)
rawCount=0
}
}
if(TG_GetValueStatus(connectionId,TG_DATA_POOR_SIGNAL)!=0){

shortpq=(short)TG_GetValue(connectionId,TG_DATA_POOR_SIGNAL)
SYSTEMTIMEst
GetSystemTime(&st)
swprintf(buffer,100,L"%6d,PQ[%3d],[%d]",st.wSecond*1000+st.wMilliseconds,pq,
lastRawCount)
rawCount=0
OutputLog(buffer)
(NSK_ALGO_DataStreamAddr)(NSK_ALGO_DATA_TYPE_PQ,&pq,1)
}
if(TG_GetValueStatus(connectionId,TG_DATA_ATTENTION)!=0){
shortatt=(short)TG_GetValue(connectionId,TG_DATA_ATTENTION)
(NSK_ALGO_DataStreamAddr)(NSK_ALGO_DATA_TYPE_ATT,&att,1)
}
if(TG_GetValueStatus(connectionId,TG_DATA_MEDITATION)!=0){
shortmed=(short)TG_GetValue(connectionId,TG_DATA_MEDITATION)
(NSK_ALGO_DataStreamAddr)(NSK_ALGO_DATA_TYPE_MED,&med,1)
}
}
//Sleep(1)
}
}

ReferencesandBugreports

Youcangetthelatestdeveloperinformationfromhere:
http://developer.neurosky.com/

LearnaboutNeuroSkysEEGDataTypeshere:
http://developer.neurosky.com/docs/doku.php?id=thinkgear_communications_protocol

YoumayfindsomeadditionalusefulinformationintheKnowledgeBase:
http://support.neurosky.com/kb

Ifyoufindanybugs,pleasecontactusat:
support@neurosky.com

You might also like