Yesterday, 06:27 AM
I recently purchased a NeuroSky MindWave Mobile 2, an very affordable Bluetooth EEG headset ($129/€125/£107/₹11,065). Due to compatibility issues with Windows 11, I installed Windows 10 as a secondary operating system. After trying several apps, I discovered that the device transmits brainwave data to a virtual COM4 port, appearing as chunks of ASCII characters. By converting the ASCII characters to their numerical values, I can graphically represent the data, which reflects my brain activity. For instance, blinking my eyes or focusing on a photo's details results in noticeable data changes. It looks like there are also variable names included in the data, because between the variable data there are also values that don't change and show up as a dotted line.
These data variations can serve as inputs for applications like computer games or even maybe a type-with-your-brain interface (like a P300 speller, although I don't know yet if the device is capable of detecting P300 waves). I've also experimented with converting the brainwaves into sounds.
The MindWave comes with a developer kit and a library DLL (ThinkGear64.dll) that I aim to integrate into QB64. This integration would provide structured and accurate frequency data corresponding to different brainwave types (alpha, beta, etc.), enabling a broader range of applications.
Has anyone experience integrating such libraries into QB64? Any guidance on effectively utilizing ThinkGear64.dll within QB64 would be greatly appreciated.
These data variations can serve as inputs for applications like computer games or even maybe a type-with-your-brain interface (like a P300 speller, although I don't know yet if the device is capable of detecting P300 waves). I've also experimented with converting the brainwaves into sounds.
The MindWave comes with a developer kit and a library DLL (ThinkGear64.dll) that I aim to integrate into QB64. This integration would provide structured and accurate frequency data corresponding to different brainwave types (alpha, beta, etc.), enabling a broader range of applications.
Has anyone experience integrating such libraries into QB64? Any guidance on effectively utilizing ThinkGear64.dll within QB64 would be greatly appreciated.
Code: (Select All)
Screen _NewImage(2560, 1440, 256)
Dim dataByte As String * 1
Dim numericValue As Integer
Dim comPort As String
comPort = "COM6:57600,N,8,1,BIN"
On Error GoTo ErrorHandler
Open comPort For Binary As #1
Do
If Loc(1) > 0 Then
Get #1, , dataByte
numericValue = Asc(dataByte)
numericValue = numericValue
' (I exclude the variables that don't change, not a very elegant solution)
If numericValue <> 0 And numericValue <> 2 And numericValue <> 1 And numericValue <> 4 And numericValue <> 83 And numericValue <> 255 And numericValue <> 254 And numericValue <> 254 And numericValue <> 42 And numericValue <> 128 And numericValue <> 41 And numericValue <> 170 And numericValue <> 85 And numericValue <> 40 And numericValue <> 34 And numericValue <> 91 And numericValue <> 82 And numericValue <> 43 And numericValue <> 84 Then teller = teller + 1
If teller > 2558 Then teller = 0: oldteller = 0
Line (teller + 1, 0)-(teller + 2, 1440), 0, BF
If numericValue <> 0 And numericValue <> 2 And numericValue <> 1 And numericValue <> 4 And numericValue <> 83 And numericValue <> 255 And numericValue <> 254 And numericValue <> 254 And numericValue <> 42 And numericValue <> 128 And numericValue <> 41 And numericValue <> 170 And numericValue <> 85 And numericValue <> 40 And numericValue <> 34 And numericValue <> 91 And numericValue <> 82 And numericValue <> 43 And numericValue <> 84 Then Line (oldteller, oldNnumericValue + 400)-(teller, numericValue), 10
Let oldNnumericValue = numericValue
Let oldteller = teller
End If
Loop Until InKey$ = Chr$(27)
Close #1
Print "Connection closed."
End
ErrorHandler:
Print "Dude, you did something wrong!"